edu.umd.cfar.lamp.viper.util
Interface Incrementable

All Superinterfaces:
java.lang.Comparable
All Known Subinterfaces:
Instant
All Known Implementing Classes:
Frame, Time

public interface Incrementable
extends java.lang.Comparable

Extension to Comparable objects that allow increment and decrement operations. This is useful for sorted maps, and other systems that require an abstract increment procedure.

Author:
davidm

Method Summary
 Incrementable next()
          Gets the item following this one.
 Incrementable previous()
          Gets the item before this one.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

next

public Incrementable next()
Gets the item following this one. Should have true == a.next().prev().equals(a).

Returns:
Incrementable immediately following this one

previous

public Incrementable previous()
Gets the item before this one. Should have true == a.prev().next().equals(a).

Returns:
Incrementable immediately prior to this one