Package edu.cnu.mdi.mapping.shapefile
Record Class ShapefileGeometryReader.ShapeRecord
java.lang.Object
java.lang.Record
edu.cnu.mdi.mapping.shapefile.ShapefileGeometryReader.ShapeRecord
- Record Components:
recordNumber- one-based record number as stored in the fileshapeType- shape type for this record; one of theTYPE_*constantspoints- flat list of points; non-empty forShapefileGeometryReader.TYPE_POINTandShapefileGeometryReader.TYPE_MULTIPOINT; empty for ring-based typesrings- list of ring/part coordinate lists; non-empty forShapefileGeometryReader.TYPE_POLYGONandShapefileGeometryReader.TYPE_POLYLINE; empty for point types
- Enclosing class:
ShapefileGeometryReader
public static record ShapefileGeometryReader.ShapeRecord(int recordNumber, int shapeType, List<Point2D.Double> points, List<List<Point2D.Double>> rings)
extends Record
Immutable container for the geometry data of a single shapefile record.
-
Constructor Summary
ConstructorsConstructorDescriptionShapeRecord(int recordNumber, int shapeType, List<Point2D.Double> points, List<List<Point2D.Double>> rings) Creates an instance of aShapeRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.points()Returns the value of thepointsrecord component.intReturns the value of therecordNumberrecord component.rings()Returns the value of theringsrecord component.intReturns the value of theshapeTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ShapeRecord
public ShapeRecord(int recordNumber, int shapeType, List<Point2D.Double> points, List<List<Point2D.Double>> rings) Creates an instance of aShapeRecordrecord class.- Parameters:
recordNumber- the value for therecordNumberrecord componentshapeType- the value for theshapeTyperecord componentpoints- the value for thepointsrecord componentrings- the value for theringsrecord 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 '=='. -
recordNumber
public int recordNumber()Returns the value of therecordNumberrecord component.- Returns:
- the value of the
recordNumberrecord component
-
shapeType
public int shapeType()Returns the value of theshapeTyperecord component.- Returns:
- the value of the
shapeTyperecord component
-
points
Returns the value of thepointsrecord component.- Returns:
- the value of the
pointsrecord component
-
rings
Returns the value of theringsrecord component.- Returns:
- the value of the
ringsrecord component
-