Record Class Expression
java.lang.Object
java.lang.Record
dev.pfaff.altargui.ffi.Expression
- All Implemented Interfaces:
ToExpression
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionExpression
(double constant) Expression
(double constant, List<Term> terms) Creates an instance of aExpression
record class.Expression
(Term... terms) -
Method Summary
Modifier and TypeMethodDescriptiondouble
constant()
Returns the value of theconstant
record component.dividedBy
(double rhs) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.minus
(Expression rhs) minus
(ToExpression rhs) negate()
plus
(double constant) plus
(Expression rhs) plus
(ToExpression rhs) terms()
Returns the value of theterms
record component.times
(double rhs) toString()
Returns a string representation of this record class.
-
Field Details
-
ZERO
-
-
Constructor Details
-
Expression
-
Expression
public Expression(double constant) -
Expression
-
-
Method Details
-
toExpression
- Specified by:
toExpression
in interfaceToExpression
-
plus
- Specified by:
plus
in interfaceToExpression
-
plus
- Specified by:
plus
in interfaceToExpression
-
minus
- Specified by:
minus
in interfaceToExpression
-
plus
- Specified by:
plus
in interfaceToExpression
-
minus
- Specified by:
minus
in interfaceToExpression
-
plus
- Specified by:
plus
in interfaceToExpression
-
minus
- Specified by:
minus
in interfaceToExpression
-
plus
- Specified by:
plus
in interfaceToExpression
-
minus
- Specified by:
minus
in interfaceToExpression
-
times
- Specified by:
times
in interfaceToExpression
-
dividedBy
- Specified by:
dividedBy
in interfaceToExpression
-
negate
- Specified by:
negate
in interfaceToExpression
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
constant
public double constant()Returns the value of theconstant
record component.- Returns:
- the value of the
constant
record component
-
terms
-