@Generated(value={"Immutables.generator","RoutesAsGraph.RouteAndVertex"}) public final class ImmutableRouteAndVertex extends Object implements RoutesAsGraph.RouteAndVertex
RoutesAsGraph.RouteAndVertex.
Use the builder to create immutable instances:
ImmutableRouteAndVertex.builder().
Use the static factory method to create immutable instances:
ImmutableRouteAndVertex.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableRouteAndVertex.Builder
Builds instances of type
ImmutableRouteAndVertex. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableRouteAndVertex.Builder |
builder()
Creates a builder for
ImmutableRouteAndVertex. |
static ImmutableRouteAndVertex |
copyOf(RoutesAsGraph.RouteAndVertex instance)
Creates an immutable copy of a
RoutesAsGraph.RouteAndVertex value. |
NamedType<?> |
end() |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableRouteAndVertex that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
start, route, end. |
static ImmutableRouteAndVertex |
of(NamedType<?> start,
Route<?> route,
NamedType<?> end)
Construct a new immutable
RouteAndVertex instance. |
Route<?> |
route() |
NamedType<?> |
start() |
String |
toString()
Prints the immutable value
RouteAndVertex with attribute values. |
ImmutableRouteAndVertex |
withEnd(NamedType<?> value)
Copy the current immutable object by setting a value for the
end attribute. |
ImmutableRouteAndVertex |
withRoute(Route<?> value)
Copy the current immutable object by setting a value for the
route attribute. |
ImmutableRouteAndVertex |
withStart(NamedType<?> value)
Copy the current immutable object by setting a value for the
start attribute. |
public NamedType<?> start()
start in interface RoutesAsGraph.RouteAndVertexstart attributepublic Route<?> route()
route in interface RoutesAsGraph.RouteAndVertexroute attributepublic NamedType<?> end()
end in interface RoutesAsGraph.RouteAndVertexend attributepublic final ImmutableRouteAndVertex withStart(NamedType<?> 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 ImmutableRouteAndVertex withRoute(Route<?> value)
route attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for routethis objectpublic final ImmutableRouteAndVertex withEnd(NamedType<?> 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 boolean equals(Object another)
ImmutableRouteAndVertex that have equal attribute values.public int hashCode()
start, route, end.public String toString()
RouteAndVertex with attribute values.public static ImmutableRouteAndVertex of(NamedType<?> start, Route<?> route, NamedType<?> end)
RouteAndVertex instance.of in interface RoutesAsGraph.RouteAndVertexstart - The value for the start attributeroute - The value for the route attributeend - The value for the end attributepublic static ImmutableRouteAndVertex copyOf(RoutesAsGraph.RouteAndVertex instance)
RoutesAsGraph.RouteAndVertex value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableRouteAndVertex.Builder builder()
ImmutableRouteAndVertex.Copyright © 2017. All rights reserved.