public class CoordinateXYZM extends Coordinate
This data object is suitable for use with coordinate sequences with dimension = 4 and measures = 1.
Coordinate.DimensionalComparator
M, NULL_ORDINATE, x, X, y, Y, z, Z
Constructor and Description |
---|
CoordinateXYZM()
Default constructor
|
CoordinateXYZM(Coordinate coord)
Constructs a CoordinateXYZM instance with the ordinates of the given Coordinate.
|
CoordinateXYZM(CoordinateXYZM coord)
Constructs a CoordinateXYZM instance with the ordinates of the given CoordinateXYZM.
|
CoordinateXYZM(double x,
double y,
double z,
double m)
Constructs a CoordinateXYZM instance with the given ordinates and measure.
|
Modifier and Type | Method and Description |
---|---|
CoordinateXYZM |
copy()
Creates a copy of this CoordinateXYZM.
|
Coordinate |
create()
Create a new Coordinate of the same type as this Coordinate, but with no values.
|
double |
getM()
The m-measure, if available.
|
double |
getOrdinate(int ordinateIndex)
Gets the ordinate value for the given index.
|
void |
setCoordinate(Coordinate other)
Sets this
Coordinate s (x,y,z) values to that of other . |
void |
setM(double m)
Sets the measure value, if supported.
|
void |
setOrdinate(int ordinateIndex,
double value)
Sets the ordinate for the given index
to a given value.
|
String |
toString()
Returns a
String of the form (x,y,z) . |
public CoordinateXYZM()
public CoordinateXYZM(double x, double y, double z, double m)
x
- the X ordinatey
- the Y ordinatez
- the Z ordinatem
- the M measure valuepublic CoordinateXYZM(Coordinate coord)
coord
- the coordinate providing the ordinatespublic CoordinateXYZM(CoordinateXYZM coord)
coord
- the coordinate providing the ordinatespublic CoordinateXYZM copy()
copy
in class Coordinate
public Coordinate create()
create
in class Coordinate
public double getM()
getM
in class Coordinate
public void setM(double m)
Coordinate
setM
in class Coordinate
m
- the value to set as Mpublic double getOrdinate(int ordinateIndex)
Coordinate
Coordinate.X
, Coordinate.Y
, and Coordinate.Z
.getOrdinate
in class Coordinate
ordinateIndex
- the ordinate indexpublic void setCoordinate(Coordinate other)
Coordinate
Coordinate
s (x,y,z) values to that of other
.setCoordinate
in class Coordinate
other
- the Coordinate
to copypublic void setOrdinate(int ordinateIndex, double value)
Coordinate
Coordinate.X
, Coordinate.Y
, and Coordinate.Z
.setOrdinate
in class Coordinate
ordinateIndex
- the ordinate indexvalue
- the value to setpublic String toString()
Coordinate
String
of the form (x,y,z) .toString
in class Coordinate
String
of the form (x,y,z)Copyright © 2024. All rights reserved.