biz.c24.io.api.presentation.stream
Class DataReader.Locator

java.lang.Object
  extended by biz.c24.io.api.presentation.stream.DataReader.Locator
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
BorderedCharDataReader.CharDataLocator
Enclosing class:
DataReader

public class DataReader.Locator
extends Object
implements Cloneable

The location representation class.

Provides the coordinates of location in incoming data stream. The specific data reader implementation may extends this for more detail on location coordinates. The defualt provides only absolute offset.


Field Summary
protected static int HASH_PRIME
          Prime hash code basis.
 
Constructor Summary
DataReader.Locator(int offset)
          Constructor with absolute offset.
 
Method Summary
 Object clone()
          Creates and returns a copy of this object.
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
 int getOffset()
          Returns the absolute offset.
 int hashCode()
          Returns a hash code value for this instance.
protected  void reset()
           
 String toString()
          Returns a string representation of this instance.
protected  void update(int pos)
          Updates location coordinates on specified position delta.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

HASH_PRIME

protected static final int HASH_PRIME
Prime hash code basis.

See Also:
Constant Field Values
Constructor Detail

DataReader.Locator

public DataReader.Locator(int offset)
Constructor with absolute offset.

Constructs the location representation with specified absolute offset.

Parameters:
offset - The absolute offset within incoming data.
Method Detail

getOffset

public final int getOffset()
Returns the absolute offset.

Returns:
The absolute offset within incoming data.

clone

public Object clone()
Creates and returns a copy of this object.

Overrides:
clone in class Object
Returns:
a clone of this instance.
See Also:
Cloneable

hashCode

public int hashCode()
Returns a hash code value for this instance.

Overrides:
hashCode in class Object
Returns:
a hash code value for this object.
See Also:
equals(Object), Hashtable

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false - otherwise.
See Also:
hashCode(), Hashtable

toString

public String toString()
Returns a string representation of this instance.

Overrides:
toString in class Object
Returns:
a string representation of location.

update

protected void update(int pos)
Updates location coordinates on specified position delta.

Parameters:
pos - The delta between carrent and past location.

reset

protected void reset()


C24 Technologies © 2002-2012: All Rights Reserved.