@Generated(value="org.immutables.processor.ProxyProcessor") public final class ImmutableEdge<V,E> extends Object implements Edge<V,E>
Edge.
Use the builder to create immutable instances:
ImmutableEdge.builder().
Use the static factory method to create immutable instances:
ImmutableEdge.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableEdge.Builder<V,E>
Builds instances of type
ImmutableEdge. |
| Modifier and Type | Method and Description |
|---|---|
static <V,E> ImmutableEdge.Builder<V,E> |
builder()
Creates a builder for
ImmutableEdge. |
static <V,E> ImmutableEdge<V,E> |
copyOf(Edge<V,E> instance)
Creates an immutable copy of a
Edge value. |
E |
edge() |
V |
end() |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableEdge that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
start, end, edge. |
static <V,E> ImmutableEdge<V,E> |
of(V start,
V end,
E edge)
Construct a new immutable
Edge instance. |
V |
start() |
String |
toString()
Prints the immutable value
Edge with attribute values. |
ImmutableEdge<V,E> |
withEdge(E value)
Copy the current immutable object by setting a value for the
edge attribute. |
ImmutableEdge<V,E> |
withEnd(V value)
Copy the current immutable object by setting a value for the
end attribute. |
ImmutableEdge<V,E> |
withStart(V value)
Copy the current immutable object by setting a value for the
start attribute. |
public V start()
public E edge()
public final ImmutableEdge<V,E> withStart(V 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 ImmutableEdge<V,E> withEnd(V value)
end attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for endthis objectpublic final ImmutableEdge<V,E> withEdge(E value)
edge attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for edgethis objectpublic boolean equals(Object another)
ImmutableEdge that have equal attribute values.public int hashCode()
start, end, edge.public String toString()
Edge with attribute values.public static <V,E> ImmutableEdge<V,E> of(V start, V end, E edge)
Edge instance.V - generic parameter VE - generic parameter Estart - The value for the start attributeend - The value for the end attributeedge - The value for the edge attributepublic static <V,E> ImmutableEdge<V,E> copyOf(Edge<V,E> instance)
Edge value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.V - generic parameter VE - generic parameter Einstance - The instance to copypublic static <V,E> ImmutableEdge.Builder<V,E> builder()
ImmutableEdge.
ImmutableEdge.<V, E>builder()
.start(V) // required start
.end(V) // required end
.edge(E) // required edge
.build();
V - generic parameter VE - generic parameter ECopyright © 2019. All rights reserved.