- java.lang.Object
- java.lang.Record
- com.anylogic.engine.markup.density_map.DensityMapCompatibleNetworkElement.NDimensionalSpatialMetric
- Enclosing interface:
- DensityMapCompatibleNetworkElement
public static record DensityMapCompatibleNetworkElement.NDimensionalSpatialMetric(int nDimensions, double value) extends Record
| Modifier and Type | Field | Description |
|---|---|---|
static final DensityMapCompatibleNetworkElement.NDimensionalSpatialMetric | NO_METRIC |
| Constructor | Description |
|---|---|
NDimensionalSpatialMetric |
Creates an instance of a
NDimensionalSpatialMetric record class. |
| Modifier and Type | Method | Description |
|---|---|---|
final boolean | equals |
Indicates whether some other object is "equal to" this one.
|
final int | hashCode() |
Returns a hash code value for this object.
|
int | nDimensions() |
Returns the value of the
nDimensions record component. |
static DensityMapCompatibleNetworkElement.NDimensionalSpatialMetric | of | |
final String | toString() |
Returns a string representation of this record class.
|
double | value() |
Returns the value of the
value record component. |
public static final DensityMapCompatibleNetworkElement.NDimensionalSpatialMetric NO_METRIC
public NDimensionalSpatialMetric(int nDimensions, double value)
Creates an instance of a
NDimensionalSpatialMetric record class.- Parameters:
nDimensions- the value for thenDimensionsrecord componentvalue- the value for thevaluerecord component
public static DensityMapCompatibleNetworkElement.NDimensionalSpatialMetric of(int nDimensions, double value)
public final String 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.
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.
public final boolean equals(Object o)
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 with '=='.
public int nDimensions()
Returns the value of the
nDimensions record component.- Returns:
- the value of the
nDimensionsrecord component
public double value()
Returns the value of the
value record component.- Returns:
- the value of the
valuerecord component