@Generated(value={"Immutables.generator","ContractConditionType<T>"}) public final class ContractCondition<T> extends Object implements ContractConditionType<T>
ContractConditionType.
Use the builder to create immutable instances:
ContractCondition.<T>builder().
Use the static factory method to create immutable instances:
ContractCondition.<T>of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ContractCondition.Builder<T>
Builds instances of type
ContractCondition. |
| Modifier and Type | Method and Description |
|---|---|
static <T> ContractCondition.Builder<T> |
builder()
Creates a builder for
ContractCondition. |
static <T> ContractCondition<T> |
copyOf(ContractConditionType<T> instance)
Creates an immutable copy of a
ContractConditionType value. |
Function<T,String> |
describer() |
boolean |
equals(Object another)
This instance is equal to all instances of
ContractCondition that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
predicate, describer. |
static <T> ContractCondition<T> |
of(Predicate<T> predicate,
Function<T,String> describer)
Construct a new immutable
ContractCondition instance. |
Predicate<T> |
predicate() |
String |
toString()
Prints the immutable value
ContractCondition with attribute values. |
ContractCondition<T> |
withDescriber(Function<T,String> describer)
Copy the current immutable object by setting a value for the
describer attribute. |
ContractCondition<T> |
withPredicate(Predicate<T> predicate)
Copy the current immutable object by setting a value for the
predicate attribute. |
public Predicate<T> predicate()
predicate in interface ContractConditionType<T>true for the contract to
holdpublic Function<T,String> describer()
describer in interface ContractConditionType<T>public final ContractCondition<T> withPredicate(Predicate<T> predicate)
predicate attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.predicate - A new value for predicatethis objectpublic final ContractCondition<T> withDescriber(Function<T,String> describer)
describer attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.describer - A new value for describerthis objectpublic boolean equals(Object another)
ContractCondition that have equal attribute values.public int hashCode()
predicate, describer.public String toString()
ContractCondition with attribute values.public static <T> ContractCondition<T> of(Predicate<T> predicate, Function<T,String> describer)
ContractCondition instance.predicate - The value for the predicate attributedescriber - The value for the describer attributepublic static <T> ContractCondition<T> copyOf(ContractConditionType<T> instance)
ContractConditionType value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.T - generic parameter Tinstance - The instance to copypublic static <T> ContractCondition.Builder<T> builder()
ContractCondition.T - generic parameter TCopyright © 2016 <code@io7m.com> http://io7m.com