Module com.aoapps.hodgepodge
Package com.aoapps.hodgepodge.graph
Class TrivialGraph<V,E extends Edge<V>,Ex extends Exception>
java.lang.Object
com.aoapps.hodgepodge.graph.TrivialGraph<V,E,Ex>
- Type Parameters:
Ex
- An arbitrary exception type that may be thrown
- All Implemented Interfaces:
Graph<V,
,E, Ex> MultiGraph<V,
,E, Ex> SymmetricGraph<V,
,E, Ex> SymmetricMultiGraph<V,
E, Ex>
public class TrivialGraph<V,E extends Edge<V>,Ex extends Exception>
extends Object
implements SymmetricGraph<V,E,Ex>
A trivial graph is unmodifiable and has one vertex and no edges.
- Author:
- AO Industries, Inc.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetEdgesFrom
(V from) Gets the edges from the provided vertex.getEdgesTo
(V to) Gets the edges to the provided vertex.Gets the set of vertices for this graph.
-
Constructor Details
-
TrivialGraph
-
-
Method Details
-
getVertices
Description copied from interface:MultiGraph
Gets the set of vertices for this graph.- Specified by:
getVertices
in interfaceMultiGraph<V,
E extends Edge<V>, Ex extends Exception>
-
getEdgesFrom
Description copied from interface:Graph
Gets the edges from the provided vertex. The vertex must be part of this graph, and the results are undefined if it is not.A graph only allows unique combinations of from and to vertices.
-
getEdgesTo
Description copied from interface:SymmetricGraph
Gets the edges to the provided vertex. The vertex must be part of this graph, and the results are undefined if it is not.A graph only allows unique combinations of from and to vertices.
- Specified by:
getEdgesTo
in interfaceSymmetricGraph<V,
E extends Edge<V>, Ex extends Exception> - Specified by:
getEdgesTo
in interfaceSymmetricMultiGraph<V,
E extends Edge<V>, Ex extends Exception>
-