Record Class ForEachActivitySpans
java.lang.Object
java.lang.Record
gov.nasa.jpl.aerie.constraints.tree.ForEachActivitySpans
- All Implemented Interfaces:
Expression<Spans>
public record ForEachActivitySpans(org.apache.commons.lang3.function.TriFunction<ActivityInstance,SimulationResults,EvaluationEnvironment,Boolean> activityPredicate, String alias, Expression<Spans> expression)
extends Record
implements Expression<Spans>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA helper class for activity predicates that only match on type. -
Constructor Summary
ConstructorsConstructorDescriptionForEachActivitySpans(String activityType, String alias, Expression<Spans> expression) ForEachActivitySpans(org.apache.commons.lang3.function.TriFunction<ActivityInstance, SimulationResults, EvaluationEnvironment, Boolean> activityPredicate, String alias, Expression<Spans> expression) Creates an instance of aForEachActivitySpansrecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.commons.lang3.function.TriFunction<ActivityInstance, SimulationResults, EvaluationEnvironment, Boolean> Returns the value of theactivityPredicaterecord component.alias()Returns the value of thealiasrecord component.final booleanIndicates whether some other object is "equal to" this one.evaluate(SimulationResults results, Interval bounds, EvaluationEnvironment environment) Returns the value of theexpressionrecord component.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.prettyPrint(String prefix) final StringtoString()Returns a string representation of this record class.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
-
ForEachActivitySpans
-
ForEachActivitySpans
public ForEachActivitySpans(org.apache.commons.lang3.function.TriFunction<ActivityInstance, SimulationResults, EvaluationEnvironment, Boolean> activityPredicate, String alias, Expression<Spans> expression) Creates an instance of aForEachActivitySpansrecord class.- Parameters:
activityPredicate- the value for theactivityPredicaterecord componentalias- the value for thealiasrecord componentexpression- the value for theexpressionrecord component
-
-
Method Details
-
evaluate
public Spans evaluate(SimulationResults results, Interval bounds, EvaluationEnvironment environment) - Specified by:
evaluatein interfaceExpression<Spans>
-
extractResources
Description copied from interface:ExpressionAdd the resources referenced by this expression to the given set.- Specified by:
extractResourcesin interfaceExpression<Spans>
-
prettyPrint
- Specified by:
prettyPrintin interfaceExpression<Spans>
-
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). -
activityPredicate
public org.apache.commons.lang3.function.TriFunction<ActivityInstance,SimulationResults, activityPredicate()EvaluationEnvironment, Boolean> Returns the value of theactivityPredicaterecord component.- Returns:
- the value of the
activityPredicaterecord component
-
alias
Returns the value of thealiasrecord component.- Returns:
- the value of the
aliasrecord component
-
expression
Returns the value of theexpressionrecord component.- Returns:
- the value of the
expressionrecord component
-