Package org.apache.tuweni.bytes
Class DelegatingBytes32
java.lang.Object
org.apache.tuweni.bytes.AbstractBytes
org.apache.tuweni.bytes.DelegatingBytes
org.apache.tuweni.bytes.DelegatingBytes32
- All Implemented Interfaces:
Comparable<Bytes>,Bytes,Bytes32
A class that holds and delegates all operations to its inner bytes field.
This class may be used to create more types that represent 32 bytes, but need a different name for business logic.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.tuweni.bytes.DelegatingBytes
and, and, appendHexTo, appendTo, appendTo, bitLength, commonPrefix, commonPrefixLength, compareTo, copyTo, copyTo, equals, get, getInt, getInt, getLong, getLong, hashCode, hasLeadingZero, hasLeadingZeroByte, isEmpty, isZero, numberOfLeadingZeroBytes, numberOfLeadingZeros, numberOfTrailingZeroBytes, or, or, reverse, shiftLeft, shiftRight, slice, slice, toArray, toArray, toArrayUnsafe, toBase64String, toBigInteger, toBigInteger, toEllipsisHexString, toHexString, toInt, toInt, toLong, toLong, toQuantityHexString, toShortHexString, toString, toUnprefixedHexString, toUnsignedBigInteger, toUnsignedBigInteger, trimLeadingZeros, update, xor, xorMethods inherited from class org.apache.tuweni.bytes.AbstractBytes
computeHashcodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.tuweni.bytes.Bytes
and, and, appendHexTo, appendTo, appendTo, bitLength, commonPrefix, commonPrefixLength, compareTo, copyTo, copyTo, get, getInt, getInt, getLong, getLong, hasLeadingZero, hasLeadingZeroByte, isEmpty, isZero, not, numberOfLeadingZeroBytes, numberOfLeadingZeros, numberOfTrailingZeroBytes, or, or, reverse, shiftLeft, shiftRight, slice, slice, toArray, toArray, toArrayUnsafe, toBase64String, toBigInteger, toBigInteger, toEllipsisHexString, toFastHex, toHexString, toInt, toInt, toLong, toLong, toQuantityHexString, toShortHexString, toString, toUnprefixedHexString, toUnsignedBigInteger, toUnsignedBigInteger, trimLeadingZeros, trimTrailingZeros, update, xor, xor
-
Constructor Details
-
DelegatingBytes32
-
-
Method Details
-
size
public int size()Description copied from interface:BytesProvides the number of bytes this value represents. -
copy
Description copied from interface:BytesReturn a value equivalent to this one but guaranteed to 1) be deeply immutable (i.e. the underlying value will be immutable) and 2) to not retain more bytes than exposed by the value.- Specified by:
copyin interfaceBytes- Specified by:
copyin interfaceBytes32- Overrides:
copyin classDelegatingBytes- Returns:
- A value, equals to this one, but deeply immutable and that doesn't retain any "unreachable" bytes. For performance reasons, this is allowed to return this value however if it already fit those constraints.
-
mutableCopy
Description copied from interface:BytesReturn a new mutable value initialized with the content of this value.- Specified by:
mutableCopyin interfaceBytes- Specified by:
mutableCopyin interfaceBytes32- Overrides:
mutableCopyin classDelegatingBytes- Returns:
- A mutable copy of this value. This will copy bytes, modifying the returned value will not modify this value.
-