Class EntityMap
- java.lang.Object
-
- uk.gov.gchq.gaffer.data.graph.entity.EntityMap
-
public class EntityMap extends Object
AnEntityMap
is used to store the contents of a graph in memory in a format which can easily be interrogated.
-
-
Constructor Summary
Constructors Constructor Description EntityMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsVertex(Object vertex)
Check to see if this EntityMap contains a specified vertex.Set<Entity>
get(Object vertex)
Get the entries in the EntityMap which match the provided vertex.Set<Object>
getVertices()
Get all vertices referenced in this EntityMap.boolean
putEntities(Object vertex, Set<Entity> entities)
Add aSet
of entities to this EntityMap instance.boolean
putEntity(Object vertex, Entity entity)
Add an entity to this EntityMap instance.String
toString()
String
toStringFull()
-
-
-
Method Detail
-
putEntity
public boolean putEntity(Object vertex, Entity entity)
Add an entity to this EntityMap instance.- Parameters:
vertex
- the vertex associated with the entityentity
- the entity object- Returns:
true
if the entity was successfully added, otherwisefalse
-
putEntities
public boolean putEntities(Object vertex, Set<Entity> entities)
Add aSet
of entities to this EntityMap instance.- Parameters:
vertex
- the vertex associated with the entityentities
- the set of entities- Returns:
true
if the entity was successfully added, otherwisefalse
-
get
public Set<Entity> get(Object vertex)
Get the entries in the EntityMap which match the provided vertex.- Parameters:
vertex
- the vertex- Returns:
- the
Set
of edge objects relating to the specified vertex
-
getVertices
public Set<Object> getVertices()
Get all vertices referenced in this EntityMap.- Returns:
- a
Set
containing all of the vertices
-
containsVertex
public boolean containsVertex(Object vertex)
Check to see if this EntityMap contains a specified vertex.- Parameters:
vertex
- the vertex to search for- Returns:
true
if the vertex is present in the entity mpa, otherwisefalse
-
toStringFull
public String toStringFull()
-
-