001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.gui.history; 003 004/** 005 * PointInTimeType enumerates two points in time in the {@link org.openstreetmap.josm.data.osm.history.History} 006 * of an {@link org.openstreetmap.josm.data.osm.OsmPrimitive}. 007 * @author karl 008 */ 009public 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 /** 017 * Returns the opposite point in time. 018 * @return the opposite point in time 019 */ 020 public PointInTimeType opposite() { 021 if (this == REFERENCE_POINT_IN_TIME) 022 return CURRENT_POINT_IN_TIME; 023 else 024 return REFERENCE_POINT_IN_TIME; 025 } 026}