com.timeindexing.basic
Class AbsoluteAdjustablePosition

java.lang.Object
  extended bycom.timeindexing.basic.AbsoluteAdjustablePosition
All Implemented Interfaces:
Absolute, Adjustable, AdjustablePosition, java.lang.Cloneable, Position, Value

public class AbsoluteAdjustablePosition
extends java.lang.Object
implements AdjustablePosition, Absolute, java.lang.Cloneable

An AbsoluteAdjustablePosition is a value that is an absolute position from the zeroth index element but can be modified.


Field Summary
 
Fields inherited from interface com.timeindexing.basic.Position
END_OF_INDEX, TOO_HIGH, TOO_LOW
 
Constructor Summary
AbsoluteAdjustablePosition()
          Construct a new AbsoluteAdjustablePosition
AbsoluteAdjustablePosition(long value)
          Construct a new AbsoluteAdjustablePosition from a given value
AbsoluteAdjustablePosition(Position pos)
          Construct a new AbsoluteAdjustablePosition from an exisitng Position
 
Method Summary
 Adjustable adjust(long amount)
          Adjust the position forwards or backward, given a basic value.
 Adjustable adjust(Value off)
          Adjust the position forwards or backward, given a value.
 java.lang.Object clone()
          Clone me
 Position position()
          Get the position.
 java.lang.String toString()
          String value of a Position.
 long value()
          Get the count.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbsoluteAdjustablePosition

public AbsoluteAdjustablePosition()
Construct a new AbsoluteAdjustablePosition


AbsoluteAdjustablePosition

public AbsoluteAdjustablePosition(long value)
Construct a new AbsoluteAdjustablePosition from a given value


AbsoluteAdjustablePosition

public AbsoluteAdjustablePosition(Position pos)
Construct a new AbsoluteAdjustablePosition from an exisitng Position

Method Detail

position

public Position position()
Get the position.

Specified by:
position in interface Position

value

public long value()
Get the count.

Specified by:
value in interface Value

adjust

public Adjustable adjust(Value off)
Adjust the position forwards or backward, given a value.

Specified by:
adjust in interface Adjustable

adjust

public Adjustable adjust(long amount)
Adjust the position forwards or backward, given a basic value. Adjusting below 0, sets the position to 0;

Specified by:
adjust in interface Adjustable

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clone me

Specified by:
clone in interface Position
Throws:
java.lang.CloneNotSupportedException

toString

public java.lang.String toString()
String value of a Position.