Package bftsmart.consensus
Class TimestampValuePair
- java.lang.Object
-
- bftsmart.consensus.TimestampValuePair
-
- All Implemented Interfaces:
java.io.Externalizable
,java.io.Serializable
public class TimestampValuePair extends java.lang.Object implements java.io.Externalizable
This class associates a timestamp to a value- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TimestampValuePair()
Empty construtorTimestampValuePair(int timestamp, byte[] value)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
byte[]
getHashedValue()
Get the value's hashint
getTimestamp()
Get timestampbyte[]
getValue()
Get valueint
hashCode()
void
readExternal(java.io.ObjectInput in)
void
setHashedValue(byte[] hashedValue)
Set the value's hashjava.lang.String
toString()
void
writeExternal(java.io.ObjectOutput out)
-
-
-
Method Detail
-
setHashedValue
public void setHashedValue(byte[] hashedValue)
Set the value's hash- Parameters:
hashedValue
- Sintese do valor
-
getHashedValue
public byte[] getHashedValue()
Get the value's hash- Returns:
- hash of the value
-
getTimestamp
public int getTimestamp()
Get timestamp- Returns:
- The timestamp
-
getValue
public byte[] getValue()
Get value- Returns:
- Value
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
- Specified by:
writeExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
- Specified by:
readExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
-