helix.graph.model.impl
Class AbstractGraph
java.lang.Object
helix.graph.model.impl.AbstractRegistry
helix.graph.model.impl.DelegateRegistry
helix.graph.model.impl.AbstractGraph
- All Implemented Interfaces:
- Graph, Registry
- Direct Known Subclasses:
- MemGraph
public abstract class AbstractGraph
- extends DelegateRegistry
- implements Graph
Methods inherited from interface helix.graph.model.Registry |
copy, get, has, keys, registry, remove, set, set, set, set, set, set |
AbstractGraph
public AbstractGraph()
nbVertices
public int nbVertices()
- Specified by:
nbVertices
in interface Graph
nbEdges
public int nbEdges()
- this implementation is O(n).
you may override it if you can provide a better way
to do this
- Specified by:
nbEdges
in interface Graph
vertices
public Iterable<Vertex> vertices()
- Specified by:
vertices
in interface Graph
hasVertex
public boolean hasVertex(Vertex v)
- Specified by:
hasVertex
in interface Graph
disconnectVertex
public void disconnectVertex(Vertex v)
throws NoSuchVertexException
- Specified by:
disconnectVertex
in interface Graph
- Throws:
NoSuchVertexException
removeVertex
public void removeVertex(Vertex v)
throws NoSuchVertexException
- Specified by:
removeVertex
in interface Graph
- Throws:
NoSuchVertexException
getEdge
public Edge getEdge(Vertex v1,
Vertex v2)
throws NoSuchVertexException
- Specified by:
getEdge
in interface Graph
- Throws:
NoSuchVertexException
hasEdge
public boolean hasEdge(Vertex v1,
Vertex v2)
- Specified by:
hasEdge
in interface Graph
assertEdge
public Edge assertEdge(Vertex v1,
Vertex v2)
throws NoSuchVertexException,
SameVertexException
- Specified by:
assertEdge
in interface Graph
- Throws:
NoSuchVertexException
SameVertexException
removeEdge
public void removeEdge(Edge e)
- Specified by:
removeEdge
in interface Graph
findVertex
public Vertex findVertex(String registryKey,
RegistryValue registryValue)
throws DuplicateValueException
- Specified by:
findVertex
in interface Graph
- Throws:
DuplicateValueException
findVertex
public Vertex findVertex(String registryKey,
Object anyValue)
throws DuplicateValueException
- Specified by:
findVertex
in interface Graph
- Throws:
DuplicateValueException
findVertices
public GSet<Vertex> findVertices(String registryKey,
RegistryValue registryValue)
- Specified by:
findVertices
in interface Graph
findVertices
public GSet<Vertex> findVertices(String registryKey,
Object anyValue)
- Specified by:
findVertices
in interface Graph
clear
public void clear()
- Specified by:
clear
in interface Graph
addPhysicalVertex
public void addPhysicalVertex(Vertex v)
- TODO a documenter serieusement
- Specified by:
addPhysicalVertex
in interface Graph
physicalSplit
public Set<Graph> physicalSplit(Iterable<GSet<Vertex>> splits)
- TODO a documenter serieusement
en particulier : destroy the current graph
accepte un visiteur a classes recouvrantes et non totalement couvrant
- Specified by:
physicalSplit
in interface Graph