public class DefaultAtom extends AbstractAtom implements Serializable
Constructor and Description |
---|
DefaultAtom(Atom atom) |
DefaultAtom(Predicate predicate) |
DefaultAtom(Predicate predicate,
List<Term> terms) |
DefaultAtom(Predicate predicate,
Term... terms) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Term term)
Returns true if the term list contains the specified term.
|
Set<Constant> |
getConstants()
Get all constants that appear is this atom.
|
Set<Literal> |
getLiterals()
Get all literals that appear is this atom.
|
Predicate |
getPredicate()
Get the predicate.
|
Term |
getTerm(int index)
Returns the Term with the specified index.
|
List<Term> |
getTerms()
Returns the List of Term.
|
Collection<Term> |
getTerms(Term.Type type)
Deprecated.
|
Set<Variable> |
getVariables()
Get all variables that appear is this atom.
|
int[] |
indexesOf(Term term)
Returns the indexes of a given term in the atom.
|
int |
indexOf(Term t)
Returns the index of the first occurrence of the specified term in the
term list of this atom, or -1 if this atom does not contain the term.
|
Iterator<Term> |
iterator()
Return an Iterator of Term.
|
void |
setPredicate(Predicate predicate)
Set the predicate.
|
void |
setTerm(int index,
Term term)
Set the Term with the specified index.
|
void |
setTerms(List<Term> terms)
Set the List of Term.
|
appendTo, compareTo, equals, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public DefaultAtom(Predicate predicate)
public DefaultAtom(Atom atom)
atom
- @Deprecated public Collection<Term> getTerms(Term.Type type)
Atom
Atom.getConstants()
and Atom.getVariables()
instead. public Set<Constant> getConstants()
Atom
getConstants
in interface Atom
getConstants
in class AbstractAtom
public Set<Variable> getVariables()
Atom
getVariables
in interface Atom
getVariables
in class AbstractAtom
public Set<Literal> getLiterals()
Atom
getLiterals
in interface Atom
getLiterals
in class AbstractAtom
public boolean contains(Term term)
Atom
public int indexOf(Term t)
Atom
public int[] indexesOf(Term term)
Atom
public void setPredicate(Predicate predicate)
setPredicate
in interface Atom
public Predicate getPredicate()
getPredicate
in interface Atom
public void setTerm(int index, Term term)
public Term getTerm(int index)
Copyright © 2014–2018 GraphIK (INRIA - LIRMM). All rights reserved.