Interface AdjacencyMaps
-
- All Superinterfaces:
Iterable<AdjacencyMap>
- All Known Implementing Classes:
PrunedAdjacencyMaps
,SimpleAdjacencyMaps
public interface AdjacencyMaps extends Iterable<AdjacencyMap>
AnAdjacencyMaps
object contains a number ofAdjacencyMap
objects and can be used to represent the changes in an AdjacencyMap over time or to track the adjacency components of a graph over some other metric.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
add(AdjacencyMap adjacencyMap)
Add a newAdjacencyMap
.List<AdjacencyMap>
asList()
Get a representation of the current AdjacencyMaps object as aList
.default boolean
empty()
Returntrue
if this AdjacencyMaps object is empty, otherwisefalse
.default AdjacencyMap
get(int n)
Retrieve the nthAdjacencyMap
.default Iterator<AdjacencyMap>
iterator()
default String
prettyPrint()
Print theAdjacencyMaps
object in an easily readable format.default int
size()
Return the number ofAdjacencyMap
s present in the AdjacencyMaps object.-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
add
default void add(AdjacencyMap adjacencyMap)
Add a newAdjacencyMap
.- Parameters:
adjacencyMap
- the AdjacencyMap to add
-
get
default AdjacencyMap get(int n)
Retrieve the nthAdjacencyMap
.- Parameters:
n
- the index of the adjacency map to retrieve- Returns:
- the nth AdjacencyMap
-
size
default int size()
Return the number ofAdjacencyMap
s present in the AdjacencyMaps object.Depending on the context, this could refer to the number of hops present, or the number of timesteps etc.
- Returns:
- the size of the AdjacencyMaps object
-
empty
default boolean empty()
Returntrue
if this AdjacencyMaps object is empty, otherwisefalse
.- Returns:
- the empty state of this object
-
prettyPrint
default String prettyPrint()
Print theAdjacencyMaps
object in an easily readable format.- Returns:
- a prettily printed
String
representation of the AdjacencyMap object.
-
iterator
default Iterator<AdjacencyMap> iterator()
- Specified by:
iterator
in interfaceIterable<AdjacencyMap>
-
asList
List<AdjacencyMap> asList()
Get a representation of the current AdjacencyMaps object as aList
.- Returns:
- a
List
representation of the current AdjacencyMaps object
-
-