001 // License: GPL. For details, see LICENSE file. 002 package org.openstreetmap.josm.gui.history; 003 004 /** 005 * PointInTimeType enumerates two points in time in the {@link History} of an {@link OsmPrimitive}. 006 * @author karl 007 * 008 */ 009 public enum PointInTimeType { 010 /** the point in time selected as reference point when comparing two version */ 011 REFERENCE_POINT_IN_TIME, 012 013 /** the point in time selected as current point when comparing two version */ 014 CURRENT_POINT_IN_TIME; 015 016 public PointInTimeType opposite() { 017 if (this.equals(REFERENCE_POINT_IN_TIME)) 018 return CURRENT_POINT_IN_TIME; 019 else 020 return REFERENCE_POINT_IN_TIME; 021 } 022 }