Record Class ByteVector
java.lang.Object
java.lang.Record
io.micronaut.data.model.vector.ByteVector
- Record Components:
data- the backing byte values array (a defensive copy is returned by accessors)
- All Implemented Interfaces:
Vector
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]data()Returns the value of thedatarecord component.booleanIndicates whether some other object is "equal to" this one.getType()Return the primitive number type the vector is backed by.inthashCode()Returns a hash code value for this object.byte[]Convert this vector to a new byte array copy.double[]Convert this vector to a new double array copy.float[]Convert this vector to a new float array copy.@NonNull StringtoString()Returns a string representation of this record class.Methods inherited from interface Vector
toSparseByteVector, toSparseDoubleVector, toSparseFloatVector
-
Constructor Details
-
ByteVector
public ByteVector(byte[] data) Creates a byte vector.- Parameters:
data- the backing values
-
-
Method Details
-
data
-
getType
-
toFloatArray
public float[] toFloatArray()Convert this vector to a new float array copy.- Specified by:
toFloatArrayin interfaceVector- Returns:
- a new float[] with the vector content
-
toDoubleArray
public double[] toDoubleArray()Convert this vector to a new double array copy.- Specified by:
toDoubleArrayin interfaceVector- Returns:
- a new double[] with the vector content
-
toByteArray
public byte[] toByteArray()Convert this vector to a new byte array copy.- Specified by:
toByteArrayin interfaceVector- Returns:
- a new byte[] with the vector content
-
toString
-
hashCode
-
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).
-