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.ExternalizableThis 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 booleanequals(java.lang.Object o)byte[]getHashedValue()Get the value's hashintgetTimestamp()Get timestampbyte[]getValue()Get valueinthashCode()voidreadExternal(java.io.ObjectInput in)voidsetHashedValue(byte[] hashedValue)Set the value's hashjava.lang.StringtoString()voidwriteExternal(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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
-