|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmessif.objects.keys.AbstractObjectKey
messif.objects.keys.DoubleKey
public class DoubleKey
The object key that contains a double value and a locator URI.
Field Summary | |
---|---|
double |
key
The double key |
Constructor Summary | |
---|---|
protected |
DoubleKey(BinaryInput input,
BinarySerializator serializator)
Creates a new instance of DoubleKey loaded from binary input. |
|
DoubleKey(java.lang.String keyString)
Creates a new instance of AbstractObjectKey given a buffered reader with the first line of the following format: "doubleKey locatorUri" |
|
DoubleKey(java.lang.String locatorURI,
double key)
Creates a new instance of DoubleKey |
Method Summary | |
---|---|
int |
binarySerialize(BinaryOutput output,
BinarySerializator serializator)
Binary-serialize this object into the output . |
int |
compareTo(AbstractObjectKey o)
Compare the keys according to the double key |
boolean |
equals(java.lang.Object obj)
Equals according to the double key. |
int |
getBinarySize(BinarySerializator serializator)
Returns the exact size of the binary-serialized version of this object in bytes. |
int |
hashCode()
Return the double key converted to int. |
java.lang.String |
toString()
Returns the URI string. |
protected void |
writeData(java.io.OutputStream stream)
Store this key's data to a text stream. |
Methods inherited from class messif.objects.keys.AbstractObjectKey |
---|
create, getLocatorURI, write |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final double key
Constructor Detail |
---|
public DoubleKey(java.lang.String locatorURI, double key)
locatorURI
- the URI locatorkey
- the double key of the object - it musn't be nullpublic DoubleKey(java.lang.String keyString) throws java.lang.IllegalArgumentException
keyString
- the text stream to read an object from
java.lang.IllegalArgumentException
- if the string is not of format "doubleKey locatorUri"protected DoubleKey(BinaryInput input, BinarySerializator serializator) throws java.io.IOException
input
- the input to read the DoubleKey fromserializator
- the serializator used to write objects
java.io.IOException
- if there was an I/O error reading from the inputMethod Detail |
---|
protected void writeData(java.io.OutputStream stream) throws java.io.IOException
AbstractObjectKey
writeData
in class AbstractObjectKey
stream
- the stream to store this object to
java.io.IOException
- if there was an error while writing to streampublic int compareTo(AbstractObjectKey o)
compareTo
in interface java.lang.Comparable<AbstractObjectKey>
compareTo
in class AbstractObjectKey
o
- the key to compare this key with
public int hashCode()
hashCode
in class AbstractObjectKey
public boolean equals(java.lang.Object obj)
equals
in class AbstractObjectKey
obj
- object to compare this object to
obj
argument; false otherwisepublic java.lang.String toString()
AbstractObjectKey
toString
in class AbstractObjectKey
public int binarySerialize(BinaryOutput output, BinarySerializator serializator) throws java.io.IOException
output
.
binarySerialize
in interface BinarySerializable
binarySerialize
in class AbstractObjectKey
output
- the output that this object is binary-serialized intoserializator
- the serializator used to write objects
java.io.IOException
- if there was an I/O error during serializationpublic int getBinarySize(BinarySerializator serializator)
getBinarySize
in interface BinarySerializable
getBinarySize
in class AbstractObjectKey
serializator
- the serializator used to write objects
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |