| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableLoop.Builder<V,E>
Builds instances of type
ImmutableLoop. |
| Modifier and Type | Method and Description |
|---|---|
static <V,E> ImmutableLoop.Builder<V,E> |
builder()
Creates a builder for
ImmutableLoop. |
static <V,E> ImmutableLoop<V,E> |
copyOf(Loop<V,E> instance)
Creates an immutable copy of a
Loop value. |
Set<Edge<V,E>> |
edges() |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableLoop that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
edges. |
String |
toString()
Prints the immutable value
Loop with attribute values. |
Set<V> |
vertexSet()
Returns a lazily initialized value of the
vertexSet attribute. |
ImmutableLoop<V,E> |
withEdges(Edge<V,E>... elements)
Copy the current immutable object with elements that replace the content of
edges. |
ImmutableLoop<V,E> |
withEdges(Iterable<? extends Edge<V,E>> elements)
Copy the current immutable object with elements that replace the content of
edges. |
@SafeVarargs public final ImmutableLoop<V,E> withEdges(Edge<V,E>... elements)
edges.elements - The elements to setthis objectpublic final ImmutableLoop<V,E> withEdges(Iterable<? extends Edge<V,E>> elements)
edges.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of edges elements to setthis objectpublic boolean equals(Object another)
ImmutableLoop that have equal attribute values.public int hashCode()
edges.public String toString()
Loop with attribute values.public Set<V> vertexSet()
Returns a lazily initialized value of the vertexSet attribute.
Initialized once and only once and stored for subsequent access with proper synchronization.
In case of any exception or error thrown by the lazy value initializer,
the result will not be memoised (i.e. remembered) and on next call computation
will be attempted again.
public static <V,E> ImmutableLoop<V,E> copyOf(Loop<V,E> instance)
Loop 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> ImmutableLoop.Builder<V,E> builder()
ImmutableLoop.
ImmutableLoop.<V, E>builder()
.addEdges|addAllEdges(de.flapdoodle.graph.Edge<V, E>) // edges elements
.build();
V - generic parameter VE - generic parameter ECopyright © 2019. All rights reserved.