@Generated(value={"Immutables.generator","Bridge<S, D>"}) public final class ImmutableBridge<S,D> extends Object implements Bridge<S,D>
Bridge.
Use the builder to create immutable instances:
ImmutableBridge.<S, D>builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableBridge.Builder<S,D>
Builds instances of type
ImmutableBridge. |
Route.Transition<D>| Modifier and Type | Method and Description |
|---|---|
static <S,D> ImmutableBridge.Builder<S,D> |
builder(NamedType<D> destination)
Creates a builder for
ImmutableBridge. |
static <S,D> ImmutableBridge<S,D> |
copyOf(Bridge<S,D> instance)
Creates an immutable copy of a
Bridge value. |
NamedType<D> |
destination() |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableBridge that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
start, destination. |
NamedType<S> |
start() |
String |
toString()
Prints the immutable value
Bridge with attribute values. |
ImmutableBridge<S,D> |
withDestination(NamedType<D> value)
Copy the current immutable object by setting a value for the
destination attribute. |
ImmutableBridge<S,D> |
withStart(NamedType<S> value)
Copy the current immutable object by setting a value for the
start attribute. |
public NamedType<D> destination()
destination in interface SingleDestination<D>destination attributepublic final ImmutableBridge<S,D> withStart(NamedType<S> value)
start attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for startthis objectpublic final ImmutableBridge<S,D> withDestination(NamedType<D> value)
destination attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for destinationthis objectpublic boolean equals(Object another)
ImmutableBridge that have equal attribute values.public int hashCode()
start, destination.public String toString()
Bridge with attribute values.public static <S,D> ImmutableBridge<S,D> copyOf(Bridge<S,D> instance)
Bridge value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.S - generic parameter SD - generic parameter Dinstance - The instance to copypublic static <S,D> ImmutableBridge.Builder<S,D> builder(NamedType<D> destination)
ImmutableBridge.S - generic parameter SD - generic parameter Ddestination - destination parameterCopyright © 2017. All rights reserved.