Class DefaultAtom
java.lang.Object
fr.lirmm.graphik.integraal.api.core.AbstractAtom
fr.lirmm.graphik.integraal.core.DefaultAtom
- All Implemented Interfaces:
Atom, Serializable, Comparable<Atom>, Iterable<Term>
Class that implements atoms.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultAtom(Atom atom) Creates a copy of the specified atom.DefaultAtom(Predicate predicate) Creates an atom with the specified predicate and its declared arity.DefaultAtom(Predicate predicate, Term... terms) Creates an atom with the specified predicate and term array.DefaultAtom(Predicate predicate, List<Term> terms) Creates an atom with the specified predicate and term list. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if the term list contains the specified term.Get all constants that appear is this atom.Get all literals that appear is this atom.Get the predicate.getTerm(int index) Returns the Term with the specified index.getTerms()Returns the List of Term.Deprecated.Get all variables that appear is this atom.int[]Returns the indexes of a given term in the atom.intReturns 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()Return an Iterator of Term.voidsetPredicate(Predicate predicate) Set the predicate.voidSet the Term with the specified index.voidSets the list of terms.Methods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
DefaultAtom
Creates an atom with the specified predicate and its declared arity.- Parameters:
predicate- the atom predicate
-
DefaultAtom
-
DefaultAtom
-
DefaultAtom
Creates a copy of the specified atom.- Parameters:
atom- the atom to copy
-
-
Method Details
-
getTerms
Deprecated.Description copied from interface:AtomThis method is deprecated since 1.3, useAtom.getConstants()andAtom.getVariables()instead.
Get all Term of the specified type. -
getConstants
Description copied from interface:AtomGet all constants that appear is this atom.- Specified by:
getConstantsin interfaceAtom- Overrides:
getConstantsin classAbstractAtom- Returns:
- all constants that appear is this atom.
-
getVariables
Description copied from interface:AtomGet all variables that appear is this atom.- Specified by:
getVariablesin interfaceAtom- Overrides:
getVariablesin classAbstractAtom- Returns:
- all variables that appear is this atom.
-
getLiterals
Description copied from interface:AtomGet all literals that appear is this atom.- Specified by:
getLiteralsin interfaceAtom- Overrides:
getLiteralsin classAbstractAtom- Returns:
- all literals that appear is this atom.
-
contains
-
indexOf
Description copied from interface:AtomReturns 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. -
indexesOf
-
setPredicate
Set the predicate.- Specified by:
setPredicatein interfaceAtom- Parameters:
predicate- the predicate to assign
-
getPredicate
Get the predicate.- Specified by:
getPredicatein interfaceAtom- Returns:
- the predicate of this atom.
-
setTerm
-
getTerm
-
setTerms
-
getTerms
-
iterator
-