|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jrdf.graph.global.molecule.MoleculeImpl
public class MoleculeImpl
Constructor Summary | |
---|---|
MoleculeImpl(Set<Triple> newTriples,
TripleComparator newComparator)
|
|
MoleculeImpl(TripleComparator newComparator)
|
Method Summary | |
---|---|
Molecule |
add(Set<Triple> set)
Adds a set of triples to this molecule. |
Molecule |
add(Triple triple)
Adds the given triple to the molecule. |
boolean |
contains(SubjectNode subject,
PredicateNode predicate,
ObjectNode object)
Checks to see if the given triple exists within the molecule. |
boolean |
contains(Triple triple)
Checks to see if the given triple exists within the molecule. |
boolean |
equals(Object obj)
|
Triple |
getHeadTriple()
Returns the head triple of the molecule. |
LinkedHashSet<Triple> |
getTailTriples()
|
SortedSet<Triple> |
getTriples()
Returns all triples in the molecule. |
int |
hashCode()
|
Iterator<Triple> |
iterator()
Returns an iterator for the set of triples which make up this molecule. |
Molecule |
remove(Triple triple)
Removes a triple from the molecule. |
int |
size()
Number of triples contained in the molecule. |
Iterator<Triple> |
tailTriples()
An iterator that contains tail triples i.e. all triples except head triple. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MoleculeImpl(TripleComparator newComparator)
public MoleculeImpl(Set<Triple> newTriples, TripleComparator newComparator)
Method Detail |
---|
public Triple getHeadTriple()
Molecule
getHeadTriple
in interface Molecule
public Molecule remove(Triple triple)
Molecule
remove
in interface Molecule
triple
- the triple to remove.
public boolean contains(SubjectNode subject, PredicateNode predicate, ObjectNode object)
Molecule
contains
in interface Molecule
subject
- the subject to search for - does not currently support ANY_SUBJECT.predicate
- the predicate to search for - does not currently support ANY_PREDICATE.object
- the object to search for - does not currently support ANY_OBJECT.
public boolean contains(Triple triple)
Molecule
contains
in interface Molecule
triple
- the triple to search for - does not currently support ANY_SUBJECT, etc.
public Iterator<Triple> iterator()
Molecule
iterator
in interface Molecule
public SortedSet<Triple> getTriples()
Molecule
getTriples
in interface Molecule
public Iterator<Triple> tailTriples()
Molecule
tailTriples
in interface Molecule
public LinkedHashSet<Triple> getTailTriples()
public Molecule add(Triple triple)
Molecule
add
in interface Molecule
triple
- the triple to add.
public Molecule add(Set<Triple> set)
Molecule
add
in interface Molecule
set
- the set of triples.
public int size()
Molecule
size
in interface Molecule
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |