Record Class EncodedShape
java.lang.Object
java.lang.Record
ch.so.agi.gretl.internal.shapefile.core.EncodedShape
public record EncodedShape(ByteBuffer content, int contentLengthBytes, Bounds bounds)
extends Record
A single Shapefile record content, already serialized into little-endian bytes.
The content() buffer is positioned at 0 with its limit set to
contentLengthBytes() and is ready to be written to a .shp channel. It already
contains the leading little-endian shape type integer, exactly like the content returned by the
reader, so that ShpGeometryDecoder can read it back unchanged.
bounds() is null for NULL shapes, because they do not contribute to
the dataset bounding box.
-
Constructor Summary
ConstructorsConstructorDescriptionEncodedShape(ByteBuffer content, int contentLengthBytes, Bounds bounds) Creates an instance of aEncodedShaperecord class. -
Method Summary
Modifier and TypeMethodDescriptionbounds()Returns the value of theboundsrecord component.content()Returns the value of thecontentrecord component.intReturns the value of thecontentLengthBytesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EncodedShape
Creates an instance of aEncodedShaperecord class.- Parameters:
content- the value for thecontentrecord componentcontentLengthBytes- the value for thecontentLengthBytesrecord componentbounds- the value for theboundsrecord 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 '=='. -
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
contentLengthBytes
public int contentLengthBytes()Returns the value of thecontentLengthBytesrecord component.- Returns:
- the value of the
contentLengthBytesrecord component
-
bounds
Returns the value of theboundsrecord component.- Returns:
- the value of the
boundsrecord component
-