Record Class ByteString
java.lang.Object
java.lang.Record
org.eclipse.milo.opcua.stack.core.types.builtin.ByteString
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionByteString(byte @Nullable [] bytes) Creates an instance of aByteStringrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbytebyteAt(int index) byte @Nullable []bytes()Returns the value of thebytesrecord component.byte[]bytesOrElse(byte[] other) byte[]booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.booleanbooleanisNull()booleanintlength()static ByteStringof(byte[] bs) toString()Returns a string representation of this record class.uByteAt(int index) UByte @Nullable []uBytes()UByte[]uBytesOrElse(UByte[] other) UByte[]
-
Field Details
-
NULL_VALUE
-
-
Constructor Details
-
ByteString
public ByteString(byte @Nullable [] bytes) Creates an instance of aByteStringrecord class.- Parameters:
bytes- the value for thebytesrecord component
-
-
Method Details
-
length
public int length() -
isNull
public boolean isNull() -
isNullOrEmpty
public boolean isNullOrEmpty() -
isNotNull
public boolean isNotNull() -
bytesOrElse
public byte[] bytesOrElse(byte[] other) -
bytesOrEmpty
public byte[] bytesOrEmpty() -
uBytes
-
uBytesOrElse
-
uBytesOrEmpty
-
byteAt
public byte byteAt(int index) -
uByteAt
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
of
-
bytes
public byte @Nullable [] bytes()Returns the value of thebytesrecord component.- Returns:
- the value of the
bytesrecord component
-