Class SampledValue

java.lang.Object
nz.org.riskscape.engine.coverage.SampledValue

public class SampledValue extends Object

Data class used for holding the results of a sampling operation (Non-generic version of Pair).

  • Field Details

    • STRUCT_ANYTHING

      public static final Struct STRUCT_ANYTHING

      Wildcard version of the struct this class produces, useful for ArgumentList

  • Method Details

    • struct

      public static Struct struct(Type valueType)

      Return a version of the struct this class produces with a specific sampled value type

    • of

      public static SampledValue of(org.locationtech.jts.geom.Geometry geom, Object value)

      Static constructor

    • withValue

      public SampledValue withValue(Object newValue)
      Returns:
      a new SampledValue with the value replaced
    • toPair

      public Pair<org.locationtech.jts.geom.Geometry,Object> toPair()

      For compatibility with tests, return as a pair

    • toTuple

      public Tuple toTuple(Struct struct)

      Convert this sampled value in to a tuple. The struct should be something produced via the struct(Type) method, usually during realization

    • getGeometry

      public org.locationtech.jts.geom.Geometry getGeometry()

      The geometry that is associated with the value, might be a whole region feature, might be a pixel where the value was centred.

    • getValue

      public Object getValue()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object