nl.lxtreme.ols.test.data.project
Class StubCursor

java.lang.Object
  extended by nl.lxtreme.ols.test.data.project.StubCursor
All Implemented Interfaces:
Cloneable, Comparable<StubCursor>, nl.lxtreme.ols.api.data.Cursor

public final class StubCursor
extends Object
implements Comparable<StubCursor>, Cloneable, nl.lxtreme.ols.api.data.Cursor

Denotes a cursor with a timestamp, label and index.


Constructor Summary
StubCursor(int aIndex)
          Creates a new StubCursor instance.
StubCursor(int aIndex, long aTimestamp)
          Creates a new StubCursor instance.
StubCursor(int aIndex, Long aTimestamp)
          Creates a new Cursor instance.
 
Method Summary
 void clear()
          
 StubCursor clone()
          
 int compareTo(StubCursor aOtherCursor)
          
 boolean equals(Object aObject)
          
 Color getColor()
          
 int getIndex()
          
 String getLabel()
          
 long getTimestamp()
          
 int hashCode()
          
 boolean hasLabel()
          
 boolean inArea(long aTimestamp, double aDelta)
          
 boolean isDefined()
          
 void setColor(Color aColor)
          
 void setLabel(String aLabel)
          
 void setTimestamp(long aTimestamp)
          
 String toString()
          
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StubCursor

public StubCursor(int aIndex)
Creates a new StubCursor instance.

Parameters:
aIndex - the index of this cursor, >= 0 && < .
Throws:
IllegalArgumentException - in case the given index was invalid.

StubCursor

public StubCursor(int aIndex,
                  long aTimestamp)
Creates a new StubCursor instance.

Parameters:
aIndex - the index of this cursor, >= 0 && < ;
aTimestamp - the timestamp of this cursor.
Throws:
IllegalArgumentException - in case the given index was invalid.

StubCursor

public StubCursor(int aIndex,
                  Long aTimestamp)
Creates a new Cursor instance.

Parameters:
aIndex - the index of this cursor, >= 0 && < ;
aTimestamp - the timestamp of this cursor, can be null in case this cursor is undefined.
Throws:
IllegalArgumentException - in case the given index was invalid.
Method Detail

clear

public void clear()

Specified by:
clear in interface nl.lxtreme.ols.api.data.Cursor

clone

public StubCursor clone()

Specified by:
clone in interface nl.lxtreme.ols.api.data.Cursor
Overrides:
clone in class Object

compareTo

public int compareTo(StubCursor aOtherCursor)

Specified by:
compareTo in interface Comparable<StubCursor>

equals

public boolean equals(Object aObject)

Overrides:
equals in class Object

getColor

public Color getColor()

Specified by:
getColor in interface nl.lxtreme.ols.api.data.Cursor

getIndex

public int getIndex()

Specified by:
getIndex in interface nl.lxtreme.ols.api.data.Cursor

getLabel

public String getLabel()

Specified by:
getLabel in interface nl.lxtreme.ols.api.data.Cursor

getTimestamp

public long getTimestamp()

Specified by:
getTimestamp in interface nl.lxtreme.ols.api.data.Cursor

hashCode

public int hashCode()

Overrides:
hashCode in class Object

hasLabel

public boolean hasLabel()

Specified by:
hasLabel in interface nl.lxtreme.ols.api.data.Cursor

inArea

public boolean inArea(long aTimestamp,
                      double aDelta)

Specified by:
inArea in interface nl.lxtreme.ols.api.data.Cursor

isDefined

public boolean isDefined()

Specified by:
isDefined in interface nl.lxtreme.ols.api.data.Cursor

setColor

public void setColor(Color aColor)

Specified by:
setColor in interface nl.lxtreme.ols.api.data.Cursor

setLabel

public void setLabel(String aLabel)

Specified by:
setLabel in interface nl.lxtreme.ols.api.data.Cursor

setTimestamp

public void setTimestamp(long aTimestamp)

Specified by:
setTimestamp in interface nl.lxtreme.ols.api.data.Cursor

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2012 L'Xtreme IT consultancy. All Rights Reserved.