org.planx.io
Class Bound

java.lang.Object
  extended by org.planx.io.Locator
      extended by org.planx.io.Bound
All Implemented Interfaces:
Comparable<Locator>, Locatable

public class Bound
extends Locator

A Bound consists of a Locator and a length.

Author:
Thomas Ambus

Nested Class Summary
 
Nested classes/interfaces inherited from class org.planx.io.Locator
Locator.CompactStreamer
 
Field Summary
static long MAX_BYTE_SIZE
           
 
Constructor Summary
Bound(Locator loc, long len)
           
Bound(long pos, long len, SourceId fsi)
           
 
Method Summary
static SizeStreamer<Bound> getBoundStreamer()
          Returns a Streamer capable of converting a Bound to and from byte representation.
 boolean isContained(Bound l)
           
 boolean isContained(Locator l)
           
 long length()
          Returns the length of the block specified by this Bound.
 void setLength(long len)
          Sets the length of this bound.
 String toString()
           
 
Methods inherited from class org.planx.io.Locator
compareTo, equals, getDiscriminator, getStreamer, hashCode, id, location, position, setId, setPosition
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_BYTE_SIZE

public static long MAX_BYTE_SIZE
Constructor Detail

Bound

public Bound(long pos,
             long len,
             SourceId fsi)

Bound

public Bound(Locator loc,
             long len)
Method Detail

length

public long length()
Returns the length of the block specified by this Bound.


setLength

public void setLength(long len)
Sets the length of this bound.


isContained

public boolean isContained(Locator l)

isContained

public boolean isContained(Bound l)

toString

public String toString()
Overrides:
toString in class Locator

getBoundStreamer

public static SizeStreamer<Bound> getBoundStreamer()
Returns a Streamer capable of converting a Bound to and from byte representation.



Copyright © 2004-2005 Plan-X. All Rights Reserved.