Record Class DiscreteValue
java.lang.Object
java.lang.Record
gov.nasa.jpl.aerie.constraints.tree.DiscreteValue
- All Implemented Interfaces:
Expression<DiscreteProfile>
public record DiscreteValue(gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue value, Optional<Expression<Interval>> interval)
extends Record
implements Expression<DiscreteProfile>
-
Constructor Summary
ConstructorsConstructorDescriptionDiscreteValue(gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue value) DiscreteValue(gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue value, Optional<Expression<Interval>> interval) Creates an instance of aDiscreteValuerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.evaluate(SimulationResults results, Interval bounds, EvaluationEnvironment environment) voidextractResources(Set<String> names) Add the resources referenced by this expression to the given set.final inthashCode()Returns a hash code value for this object.interval()Returns the value of theintervalrecord component.prettyPrint(String prefix) final StringtoString()Returns a string representation of this record class.gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValuevalue()Returns the value of thevaluerecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface gov.nasa.jpl.aerie.constraints.tree.Expression
evaluate, evaluate, evaluate, prettyPrint
-
Constructor Details
-
DiscreteValue
public DiscreteValue(gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue value) -
DiscreteValue
public DiscreteValue(gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue value, Optional<Expression<Interval>> interval) Creates an instance of aDiscreteValuerecord class.- Parameters:
value- the value for thevaluerecord componentinterval- the value for theintervalrecord component
-
-
Method Details
-
evaluate
public DiscreteProfile evaluate(SimulationResults results, Interval bounds, EvaluationEnvironment environment) - Specified by:
evaluatein interfaceExpression<DiscreteProfile>
-
extractResources
Description copied from interface:ExpressionAdd the resources referenced by this expression to the given set.- Specified by:
extractResourcesin interfaceExpression<DiscreteProfile>
-
prettyPrint
- Specified by:
prettyPrintin interfaceExpression<DiscreteProfile>
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
value
public gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue value()Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
interval
Returns the value of theintervalrecord component.- Returns:
- the value of the
intervalrecord component
-