Package jason.asSyntax
Class SetTermImpl
java.lang.Object
jason.asSyntax.DefaultTerm
jason.asSyntax.SetTermImpl
- All Implemented Interfaces:
SetTerm
,Term
,ToDOM
,ToJson
,Serializable
,Cloneable
,Comparable<Term>
,Iterable<Term>
,Collection<Term>
Represents a Jason set as a TreeSet in java
- See Also:
-
Field Summary
Fields inherited from class jason.asSyntax.DefaultTerm
hashCodeCache, srcInfo
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends Term> c) int
clone and applies together (and faster than clone and then apply)void
clear()
clone()
int
boolean
boolean
containsAll
(Collection<?> c) void
difference
(Collection<Term> lt) boolean
javax.json.JsonValue
void
intersection
(Collection<Term> lt) boolean
isEmpty()
boolean
isSet()
iterator()
boolean
boolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) int
size()
Object[]
toArray()
<T> T[]
toArray
(T[] a) toString()
void
Methods inherited from class jason.asSyntax.DefaultTerm
cloneNS, countVars, getCyclicVar, getErrorMsg, getSrcInfo, hashCode, hasVar, isArithExpr, isAtom, isCyclicTerm, isGround, isInternalAction, isList, isLiteral, isMap, isNumeric, isPlanBody, isPred, isRule, isString, isStructure, isUnnamedVar, isVar, parse, resetHashCodeCache, setSrcInfo, subsumes
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
hashCode, parallelStream, removeIf, spliterator, stream, toArray
Methods inherited from interface jason.asSyntax.Term
cloneNS, countVars, getCyclicVar, getSrcInfo, hasVar, isArithExpr, isAtom, isCyclicTerm, isGround, isInternalAction, isList, isLiteral, isMap, isNumeric, isPlanBody, isPred, isRule, isString, isStructure, isUnnamedVar, isVar, setSrcInfo, subsumes
Methods inherited from interface jason.util.ToJson
getAsJsonStr
-
Constructor Details
-
SetTermImpl
public SetTermImpl()
-
-
Method Details
-
clone
- Specified by:
clone
in interfaceTerm
- Specified by:
clone
in classDefaultTerm
-
deepClone
-
capply
Description copied from interface:Term
clone and applies together (and faster than clone and then apply)- Specified by:
capply
in interfaceTerm
- Overrides:
capply
in classDefaultTerm
-
equals
-
calcHashCode
public int calcHashCode()- Specified by:
calcHashCode
in classDefaultTerm
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Term>
- Overrides:
compareTo
in classDefaultTerm
-
size
public int size()- Specified by:
size
in interfaceCollection<Term>
-
isSet
public boolean isSet()- Specified by:
isSet
in interfaceTerm
- Overrides:
isSet
in classDefaultTerm
-
getAsListTerm
- Specified by:
getAsListTerm
in interfaceSetTerm
-
iterator
-
add
- Specified by:
add
in interfaceCollection<Term>
-
union
-
intersection
- Specified by:
intersection
in interfaceSetTerm
-
difference
- Specified by:
difference
in interfaceSetTerm
-
toString
-
getAsDOM
-
getAsJson
public javax.json.JsonValue getAsJson() -
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<Term>
-
contains
- Specified by:
contains
in interfaceCollection<Term>
-
toArray
- Specified by:
toArray
in interfaceCollection<Term>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArray
in interfaceCollection<Term>
-
remove
- Specified by:
remove
in interfaceCollection<Term>
-
containsAll
- Specified by:
containsAll
in interfaceCollection<Term>
-
addAll
- Specified by:
addAll
in interfaceCollection<Term>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<Term>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<Term>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<Term>
-