Package org.qdl_lang.variables
Class QDLSet<K extends QDLValue>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<E>
-
- java.util.HashSet<K>
-
- org.qdl_lang.variables.QDLSet<K>
-
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<K>,Collection<K>,Set<K>
public class QDLSet<K extends QDLValue> extends HashSet<K>
Created by Jeff Gaynor
on 4/6/22 at 4:02 PM- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(Object o)protected ListconvertToList()QDLSetdifference(QDLSet arg)voidfromJSON(net.sf.json.JSONArray array)JSON does not have sets, so this is a bit klugy: It will take an array and stick the values into a set.StringinputForm()QDLSetintersection(QDLSet arg)booleanisEqualTo(QDLSet arg)booleanisSubsetOf(QDLSet arg)QDLSetsymmetricDifference(QDLSet arg)net.sf.json.JSONArraytoJSON()QDLStemtoStem()StringtoString()QDLSetunion(QDLSet arg)-
Methods inherited from class java.util.HashSet
add, clear, clone, isEmpty, iterator, remove, size, spliterator
-
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
-
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
-
-
-
Constructor Detail
-
QDLSet
public QDLSet()
-
QDLSet
public QDLSet(Set set)
Constructor to initialize a set from another non-QDL set. This adds every element of the argument, not just the argument.- Parameters:
set-
-
-
Method Detail
-
contains
public boolean contains(Object o)
-
fromJSON
public void fromJSON(net.sf.json.JSONArray array)
JSON does not have sets, so this is a bit klugy: It will take an array and stick the values into a set. This is lossy.- Parameters:
array-
-
toJSON
public net.sf.json.JSONArray toJSON()
-
inputForm
public String inputForm()
-
toString
public String toString()
- Overrides:
toStringin classAbstractCollection<K extends QDLValue>
-
isSubsetOf
public boolean isSubsetOf(QDLSet arg)
-
isEqualTo
public boolean isEqualTo(QDLSet arg)
-
convertToList
protected List convertToList()
-
toStem
public QDLStem toStem()
-
-