Package org.protelis.vm.impl
Class HashingCodePathFactory.HashingCodePath
- java.lang.Object
-
- org.protelis.vm.impl.HashingCodePathFactory.HashingCodePath
-
- All Implemented Interfaces:
java.io.Serializable,CodePath
- Enclosing class:
- HashingCodePathFactory
public static final class HashingCodePathFactory.HashingCodePath extends java.lang.Object implements CodePath
Hash-basedCodePath.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HashingCodePath(byte[] hash)Builds a newHashingCodePathFactory.HashingCodePathbased on the provided hash.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)byte[]getHash()inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
HashingCodePath
public HashingCodePath(byte[] hash)
Builds a newHashingCodePathFactory.HashingCodePathbased on the provided hash.- Parameters:
hash- a byte array representing the hash it must be at least four bytes (though longer hashes are warmly recommended to avoid collisions)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
getHash
public byte[] getHash()
- Returns:
- a byte[] representation of the hash. The returned array does not map
on the internal status of
HashingCodePathFactory.HashingCodePathand can get modified.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-