Class EntityMap


  • public class EntityMap
    extends Object
    An EntityMap is used to store the contents of a graph in memory in a format which can easily be interrogated.
    • Constructor Detail

      • EntityMap

        public EntityMap()
    • Method Detail

      • putEntity

        public boolean putEntity​(Object vertex,
                                 Entity entity)
        Add an entity to this EntityMap instance.
        Parameters:
        vertex - the vertex associated with the entity
        entity - the entity object
        Returns:
        true if the entity was successfully added, otherwise false
      • putEntities

        public boolean putEntities​(Object vertex,
                                   Set<Entity> entities)
        Add a Set of entities to this EntityMap instance.
        Parameters:
        vertex - the vertex associated with the entity
        entities - the set of entities
        Returns:
        true if the entity was successfully added, otherwise false
      • 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, otherwise false
      • toStringFull

        public String toStringFull()