|
ePOST API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.p2p.past.gc.GCIdFactory
public class GCIdFactory
Nested Class Summary | |
---|---|
protected class |
GCIdFactory.GCEntrySet
|
protected class |
GCIdFactory.GCMapEntry
|
protected class |
GCIdFactory.GCSortedMap
|
Field Summary | |
---|---|
protected IdFactory |
factory
The underlying IdFactory |
Constructor Summary | |
---|---|
GCIdFactory(IdFactory factory)
Constructor |
Method Summary | |
---|---|
Id |
buildId(byte[] material)
Builds a protocol-specific Id given the source data. |
Id |
buildId(int[] material)
Builds a protocol-specific Id given the source data. |
Id |
buildId(java.lang.String string)
Builds a protocol-specific Id by using the hash of the given string as source data. |
Id.Distance |
buildIdDistance(byte[] material)
Builds a protocol-specific Id.Distance given the source data. |
Id |
buildIdFromToString(char[] chars,
int offset,
int length)
Builds an Id by converting the given toString() output back to an Id. |
Id |
buildIdFromToString(java.lang.String string)
Builds an Id by converting the given toString() output back to an Id. |
IdRange |
buildIdRange(Id cw,
Id ccw)
Creates an IdRange given the CW and CCW ids. |
IdRange |
buildIdRangeFromPrefix(java.lang.String string)
Builds an IdRange based on a prefix. |
IdSet |
buildIdSet()
Creates an empty IdSet. |
IdSet |
buildIdSet(java.util.SortedMap map)
Creates an empty IdSet. |
NodeHandleSet |
buildNodeHandleSet()
Creates an empty NodeHandleSet. |
Id |
buildNormalId(byte[] material)
Builds a protocol-specific Id given the source data. |
Id |
buildRandomId(java.util.Random rng)
Builds a random protocol-specific Id. |
Id |
buildRandomId(RandomSource rng)
|
int |
getIdToStringLength()
Returns the length a Id.toString should be. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected IdFactory factory
Constructor Detail |
---|
public GCIdFactory(IdFactory factory)
factory
- the underlying factory to useMethod Detail |
---|
public Id buildNormalId(byte[] material)
material
- The material to use
public Id buildId(byte[] material)
buildId
in interface IdFactory
material
- The material to use
public Id buildId(int[] material)
buildId
in interface IdFactory
material
- The material to use
public Id buildId(java.lang.String string)
buildId
in interface IdFactory
string
- The string to use as source data
public Id buildRandomId(java.util.Random rng)
buildRandomId
in interface IdFactory
rng
- A random number generator
public Id buildRandomId(RandomSource rng)
buildRandomId
in interface IdFactory
public Id buildIdFromToString(java.lang.String string)
buildIdFromToString
in interface IdFactory
string
- The toString() representation of an Id
public Id buildIdFromToString(char[] chars, int offset, int length)
buildIdFromToString
in interface IdFactory
chars
- The character arrayoffset
- The offset to start reading atlength
- The length to read
public IdRange buildIdRangeFromPrefix(java.lang.String string)
buildIdRangeFromPrefix
in interface IdFactory
string
- The toString() representation of an Id
public int getIdToStringLength()
getIdToStringLength
in interface IdFactory
public Id.Distance buildIdDistance(byte[] material)
buildIdDistance
in interface IdFactory
material
- The material to use
public IdRange buildIdRange(Id cw, Id ccw)
buildIdRange
in interface IdFactory
cw
- The clockwise Idccw
- The counterclockwise Id
public IdSet buildIdSet()
buildIdSet
in interface IdFactory
public IdSet buildIdSet(java.util.SortedMap map)
buildIdSet
in interface IdFactory
public NodeHandleSet buildNodeHandleSet()
buildNodeHandleSet
in interface IdFactory
|
ePOST API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |