public final class ImmutableDistinctPeculiarity<T> extends Object implements DistinctPeculiarity<T>
DistinctPeculiarity.
Use the builder to create immutable instances:
ImmutableDistinctPeculiarity.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableDistinctPeculiarity.Builder<T>
Builds instances of type
ImmutableDistinctPeculiarity. |
| Modifier and Type | Method and Description |
|---|---|
Attribute<T> |
attribute() |
static <T> ImmutableDistinctPeculiarity.Builder<T> |
builder()
Creates a builder for
ImmutableDistinctPeculiarity. |
static <T> ImmutableDistinctPeculiarity<T> |
copyOf(DistinctPeculiarity<T> instance)
Creates an immutable copy of a
DistinctPeculiarity value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableDistinctPeculiarity that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
attribute, match. |
Match<T> |
match() |
String |
toString()
Prints the immutable value
DistinctPeculiarity with attribute values. |
ImmutableDistinctPeculiarity<T> |
withAttribute(Attribute<T> value)
Copy the current immutable object by setting a value for the
attribute attribute. |
ImmutableDistinctPeculiarity<T> |
withMatch(Match<T> value)
Copy the current immutable object by setting a value for the
match attribute. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitofpublic Attribute<T> attribute()
attribute in interface DistinctPeculiarity<T>attribute attributepublic Match<T> match()
match in interface DistinctPeculiarity<T>match attributepublic final ImmutableDistinctPeculiarity<T> withAttribute(Attribute<T> value)
attribute attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for attributethis objectpublic final ImmutableDistinctPeculiarity<T> withMatch(Match<T> value)
match attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for matchthis objectpublic boolean equals(Object another)
ImmutableDistinctPeculiarity that have equal attribute values.public int hashCode()
attribute, match.public String toString()
DistinctPeculiarity with attribute values.public static <T> ImmutableDistinctPeculiarity<T> copyOf(DistinctPeculiarity<T> instance)
DistinctPeculiarity 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> ImmutableDistinctPeculiarity.Builder<T> builder()
ImmutableDistinctPeculiarity.
ImmutableDistinctPeculiarity.<T>builder()
.attribute(de.flapdoodle.os.common.attributes.Attribute<T>) // required attribute
.match(de.flapdoodle.os.common.matcher.Match<T>) // required match
.build();
builder in interface DistinctPeculiarity<T>T - generic parameter TCopyright © 2021. All rights reserved.