Class TypeSet
- java.lang.Object
-
- org.sonar.plugins.javascript.api.symbols.TypeSet
-
-
Constructor Summary
Constructors Constructor Description TypeSet()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(Type type)booleanaddAll(Collection<? extends Type> c)voidclear()booleancontains(Object o)booleancontains(Type.Kind kind)booleancontainsAll(Collection<?> c)booleancontainsOnly(Type.Kind kind)booleancontainsOnlyAndUnique(Type.Kind kind)Typeelement()static TypeSetemptyTypeSet()booleanequals(Object o)TypegetUniqueKnownType()Returns Type, which is the only not UNKNOWN element of TypeSet.TypegetUniqueType(Type.Kind kind)inthashCode()TypeSetimmutableCopy()booleanisEmpty()Iterator<Type>iterator()booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)intsize()Object[]toArray()<T> T[]toArray(T[] a)StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream
-
Methods inherited from interface java.util.Set
spliterator
-
-
-
-
Method Detail
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(Object o)
-
toArray
public Object[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
add
public boolean add(Type type)
-
remove
public boolean remove(Object o)
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<Type>- Specified by:
containsAllin interfaceSet<Type>
-
addAll
public boolean addAll(Collection<? extends Type> c)
-
retainAll
public boolean retainAll(Collection<?> c)
-
removeAll
public boolean removeAll(Collection<?> c)
-
clear
public void clear()
-
containsOnlyAndUnique
public boolean containsOnlyAndUnique(Type.Kind kind)
-
contains
public boolean contains(Type.Kind kind)
-
containsOnly
public boolean containsOnly(Type.Kind kind)
-
emptyTypeSet
public static TypeSet emptyTypeSet()
-
getUniqueKnownType
@Nullable public Type getUniqueKnownType()
Returns Type, which is the only not UNKNOWN element of TypeSet. Otherwise (if the only element is UNKNOWN or there are more than one element) result is null.
-
equals
public boolean equals(Object o)
-
hashCode
public int hashCode()
-
immutableCopy
public TypeSet immutableCopy()
-
-