Class NeighborhoodSurrogate
-
- All Implemented Interfaces:
public final class NeighborhoodSurrogate<T extends Object> extends GraphQLSurrogate<Neighborhood<T>>
A GraphQL surrogate for a Neighborhood.
-
-
Field Summary
Fields Modifier and Type Field Description private final Integer
size
private final Neighborhood<T>
origin
-
Constructor Summary
Constructors Constructor Description NeighborhoodSurrogate(Neighborhood<T> origin)
-
Method Summary
Modifier and Type Method Description final Integer
getSize()
Neighborhood<T>
getOrigin()
final NodeSurrogate<T>
getCenter()
final List<NodeSurrogate<T>>
getNeighbors()
final Boolean
isEmpty()
final Boolean
contains(NodeSurrogate<T> node)
Check whether a node is contained in this neighborhood. -
-
Constructor Detail
-
NeighborhoodSurrogate
NeighborhoodSurrogate(Neighborhood<T> origin)
-
-
Method Detail
-
getOrigin
Neighborhood<T> getOrigin()
-
getCenter
final NodeSurrogate<T> getCenter()
- Returns:
the central node of this neighborhood.
-
getNeighbors
final List<NodeSurrogate<T>> getNeighbors()
- Returns:
the list of the neighbors.
-
contains
final Boolean contains(NodeSurrogate<T> node)
Check whether a node is contained in this neighborhood.
- Returns:
true if the input node is contained in this neighborhood, false otherwise.
-
-
-
-