|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jrdf.graph.index.longindex.mem.LongIndexMem
public final class LongIndexMem
An in memory version of $LongIndex
.
Constructor Summary | |
---|---|
LongIndexMem()
|
|
LongIndexMem(Map<Long,Map<Long,Set<Long>>> newIndex)
|
Method Summary | |
---|---|
void |
add(Long[] triple)
Adds a triple to a single index. |
void |
add(Long first,
Long second,
Long third)
Adds a triple to a single index. |
long |
getSize()
Returns the number of triples in the index. |
Map<Long,Set<Long>> |
getSubIndex(Long first)
Returns the map of long to set of longs for the given entry of the index. |
Iterator<Map.Entry<Long,Map<Long,Set<Long>>>> |
iterator()
Returns an iterator which contains all the elements in the graph as a collections of distinct longs, contains a map of longs to other longs. |
void |
remove(Long[] triple)
Removes a triple from a single index. |
void |
remove(Long first,
Long second,
Long third)
Removes a triple from a single index. |
boolean |
removeSubIndex(Long first)
Removes the given entry of long to set of longs with the given entry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LongIndexMem()
public LongIndexMem(Map<Long,Map<Long,Set<Long>>> newIndex)
Method Detail |
---|
public void add(Long[] triple)
LongIndex
add
in interface LongIndex
triple
- Consists of three longs.public void add(Long first, Long second, Long third)
LongIndex
add
in interface LongIndex
first
- The first node id.second
- The second node id.third
- The last node id.public void remove(Long[] triple) throws GraphException
LongIndex
remove
in interface LongIndex
triple
- Consists of three longs.
GraphException
- If there was an error revoking the statement, for example if it didn't exist.public void remove(Long first, Long second, Long third) throws GraphException
LongIndex
remove
in interface LongIndex
first
- The first node id.second
- The second node id.third
- The last node id.
GraphException
- If there was an error revoking the statement, for example if it didn't exist.public Iterator<Map.Entry<Long,Map<Long,Set<Long>>>> iterator()
LongIndex
iterator
in interface LongIndex
public Map<Long,Set<Long>> getSubIndex(Long first)
LongIndex
getSubIndex
in interface LongIndex
first
- the entry set to find.
public boolean removeSubIndex(Long first)
LongIndex
removeSubIndex
in interface LongIndex
first
- the entry set to remove.
public long getSize()
LongIndex
getSize
in interface LongIndex
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |