|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jrdf.graph.local.index.AbstractIndex<T>
public abstract class AbstractIndex<T>
| Field Summary | |
|---|---|
protected Map<T,ClosableMap<T,Set<T>>> |
index
|
| Constructor Summary | |
|---|---|
protected |
AbstractIndex()
|
protected |
AbstractIndex(Map<T,ClosableMap<T,Set<T>>> newIndex)
|
| Method Summary | |
|---|---|
void |
add(T... triple)
Adds a triple to a single index. |
void |
clear()
Removes all triples from this index. |
void |
close()
|
boolean |
contains(T node)
Returns true if the value given exists in the index. |
long |
getSize()
Returns the number of triples in the index. |
abstract ClosableIterator<T[]> |
getSubIndex(T first)
Returns an array of results from the index. |
abstract ClosableIterator<T[]> |
iterator()
Returns an iterator which contains all the elements in the graph as an array of distinct longs. |
boolean |
keyExists(T node)
|
void |
remove(T... node)
Removes a triple from a single index. |
boolean |
removeSubIndex(T 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 |
| Methods inherited from interface org.jrdf.graph.local.index.Index |
|---|
getSubSubIndex |
| Field Detail |
|---|
protected Map<T,ClosableMap<T,Set<T>>> index
| Constructor Detail |
|---|
protected AbstractIndex(Map<T,ClosableMap<T,Set<T>>> newIndex)
protected AbstractIndex()
| Method Detail |
|---|
public void add(T... triple)
Index
add in interface Index<T>triple - The nodes to add.public boolean contains(T node)
Index
contains in interface Index<T>node - the key to search for.
public abstract ClosableIterator<T[]> iterator()
Index
iterator in interface Index<T>public abstract ClosableIterator<T[]> getSubIndex(T first)
Index
getSubIndex in interface Index<T>first - the entry to find.
public void remove(T... node)
throws GraphException
Index
remove in interface Index<T>node - the nodes to remove.
GraphException - If there was an error revoking the statement, for example if it didn't exist.public boolean keyExists(T node)
public boolean removeSubIndex(T first)
Index
removeSubIndex in interface Index<T>first - the entry set to remove.
public void clear()
Index
clear in interface Index<T>public void close()
close in interface Index<T>public long getSize()
Index
getSize in interface Index<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||