Package io.dialob.program.expr.arith
Class ImmutableLeOperator<T extends Comparable<T>>
- java.lang.Object
-
- io.dialob.program.expr.arith.ImmutableLeOperator<T>
-
- All Implemented Interfaces:
AbstractComparableRelationOperator<T>,AbstractLogicalOperator,AbstractRelationOperator<T>,InfixOperator<Boolean>,LeOperator<T>,Expression,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableLeOperator<T extends Comparable<T>> extends Object implements LeOperator<T>
Immutable implementation ofLeOperator.Use the builder to create immutable instances:
ImmutableLeOperator.builder(). Use the static factory method to create immutable instances:ImmutableLeOperator.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableLeOperator.Builder<T extends Comparable<T>>Builds instances of typeImmutableLeOperator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T extends Comparable<T>>
ImmutableLeOperator.Builder<T>builder()Creates a builder forImmutableLeOperator.static <T extends Comparable<T>>
ImmutableLeOperator<T>copyOf(LeOperator<T> instance)Creates an immutable copy of aLeOperatorvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableLeOperatorthat have equal attribute values.ExpressiongetLhs()ExpressiongetRhs()inthashCode()Computes a hash code from attributes:lhs,rhs.static <T extends Comparable<T>>
ImmutableLeOperator<T>of(Expression lhs, Expression rhs)Construct a new immutableLeOperatorinstance.StringtoString()Prints the immutable valueLeOperatorwith attribute values.ImmutableLeOperator<T>withLhs(Expression value)Copy the current immutable object by setting a value for thelhsattribute.ImmutableLeOperator<T>withRhs(Expression value)Copy the current immutable object by setting a value for therhsattribute.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.dialob.program.expr.arith.AbstractComparableRelationOperator
compare
-
Methods inherited from interface io.dialob.program.expr.arith.AbstractLogicalOperator
getValueType
-
Methods inherited from interface io.dialob.program.expr.arith.AbstractRelationOperator
eval
-
Methods inherited from interface io.dialob.program.expr.arith.InfixOperator
getEvalRequiredConditions
-
Methods inherited from interface io.dialob.program.expr.arith.LeOperator
apply, getOperator
-
-
-
-
Method Detail
-
getLhs
public Expression getLhs()
- Specified by:
getLhsin interfaceInfixOperator<T extends Comparable<T>>- Returns:
- The value of the
lhsattribute
-
getRhs
public Expression getRhs()
- Specified by:
getRhsin interfaceInfixOperator<T extends Comparable<T>>- Returns:
- The value of the
rhsattribute
-
withLhs
public final ImmutableLeOperator<T> withLhs(Expression value)
Copy the current immutable object by setting a value for thelhsattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for lhs- Returns:
- A modified copy of the
thisobject
-
withRhs
public final ImmutableLeOperator<T> withRhs(Expression value)
Copy the current immutable object by setting a value for therhsattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for rhs- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableLeOperatorthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:lhs,rhs.
-
toString
public String toString()
Prints the immutable valueLeOperatorwith attribute values.
-
of
public static <T extends Comparable<T>> ImmutableLeOperator<T> of(Expression lhs, Expression rhs)
Construct a new immutableLeOperatorinstance.- Type Parameters:
T- generic parameter T- Parameters:
lhs- The value for thelhsattributerhs- The value for therhsattribute- Returns:
- An immutable LeOperator instance
-
copyOf
public static <T extends Comparable<T>> ImmutableLeOperator<T> copyOf(LeOperator<T> instance)
Creates an immutable copy of aLeOperatorvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Type Parameters:
T- generic parameter T- Parameters:
instance- The instance to copy- Returns:
- A copied immutable LeOperator instance
-
builder
public static <T extends Comparable<T>> ImmutableLeOperator.Builder<T> builder()
Creates a builder forImmutableLeOperator.ImmutableLeOperator.<T>builder() .lhs(io.dialob.program.model.Expression) // requiredlhs.rhs(io.dialob.program.model.Expression) // requiredrhs.build();- Type Parameters:
T- generic parameter T- Returns:
- A new ImmutableLeOperator builder
-
-