Record Class HeaderRecord
java.lang.Object
java.lang.Record
org.aksw.commons.io.hadoop.binseach.v2.HeaderRecord
public record HeaderRecord(long position, int displacement, byte[] data, boolean isDataConsumed)
extends Record
position: byte or block offset
displacement: position in block; when not dealing with blocks it is always 0
data: The header data
isDataConsumed: true if there is no more data beyond what is in the 'data' array
-
Constructor Summary
ConstructorsConstructorDescriptionHeaderRecord(long position, int displacement, byte[] data, boolean isDataConsumed) Creates an instance of aHeaderRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]data()Returns the value of thedatarecord component.intReturns the value of thedisplacementrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisDataConsumedrecord component.longposition()Returns the value of thepositionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
HeaderRecord
public HeaderRecord(long position, int displacement, byte[] data, boolean isDataConsumed) Creates an instance of aHeaderRecordrecord class.- Parameters:
position- the value for thepositionrecord componentdisplacement- the value for thedisplacementrecord componentdata- the value for thedatarecord componentisDataConsumed- the value for theisDataConsumedrecord component
-
-
Method Details
-
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. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
position
public long position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
displacement
public int displacement()Returns the value of thedisplacementrecord component.- Returns:
- the value of the
displacementrecord component
-
data
public byte[] data()Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-
isDataConsumed
public boolean isDataConsumed()Returns the value of theisDataConsumedrecord component.- Returns:
- the value of the
isDataConsumedrecord component
-