Package io.crums.model.hashing
Class Construct
java.lang.Object
io.crums.model.hashing.Construct
- All Implemented Interfaces:
Entity
public final class Construct extends java.lang.Object implements Entity
-
Method Summary
Modifier and Type Method Description java.nio.ByteBuffer
bytes()
Returns the entity's state as a string of bytes.java.lang.String
canonicalText()
Returns toText() in default whitespace formatting.boolean
delimited()
Determines if the text representation of the instance is self-delimiting.java.lang.String
toString()
Returns toText().java.lang.String
toText()
Returns a parseable representation of the entity.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Method Details
-
delimited
public boolean delimited()Description copied from interface:Entity
Determines if the text representation of the instance is self-delimiting. This figures when deciding whether to bracket (group) entities in, for example, a binary operation. -
bytes
public java.nio.ByteBuffer bytes()Description copied from interface:Entity
Returns the entity's state as a string of bytes. Depending on the entity type, this may involve a computation. -
toText
public java.lang.String toText()Returns a parseable representation of the entity. This is just the string the parser read. I.e. formatting is preserved. -
canonicalText
public java.lang.String canonicalText()Returns toText() in default whitespace formatting.- Returns:
- a single line
-
toString
public java.lang.String toString()Returns toText().- Overrides:
toString
in classjava.lang.Object
-