rice.p2p.commonapi
Interface IdRange

All Known Implementing Classes:
IdRange

public interface IdRange


Method Summary
 boolean containsId(Id key)
          test if a given key lies within this range
 IdRange diffRange(IdRange range)
          diffs the given range with this range
 Id getCCWId()
          get counterclockwise edge of range
 IdRange getComplementRange()
          get the complement of this range
 Id getCWId()
          get clockwise edge of range
 IdRange intersectRange(IdRange range)
          intersects the given range with this range
 boolean isEmpty()
          returns whether or not this range is empty
 IdRange mergeRange(IdRange range)
          merges the given range with this range
 

Method Detail

containsId

public boolean containsId(Id key)
test if a given key lies within this range

Parameters:
key - the key
Returns:
true if the key lies within this range, false otherwise

getCCWId

public Id getCCWId()
get counterclockwise edge of range

Returns:
the id at the counterclockwise edge of the range (inclusive)

getCWId

public Id getCWId()
get clockwise edge of range

Returns:
the id at the clockwise edge of the range (exclusive)

getComplementRange

public IdRange getComplementRange()
get the complement of this range

Returns:
This range's complement

mergeRange

public IdRange mergeRange(IdRange range)
merges the given range with this range

Returns:
The merge

diffRange

public IdRange diffRange(IdRange range)
diffs the given range with this range

Returns:
The merge

intersectRange

public IdRange intersectRange(IdRange range)
intersects the given range with this range

Returns:
The merge

isEmpty

public boolean isEmpty()
returns whether or not this range is empty

Returns:
Whether or not this range is empty





Imprint-Dataprotection