Package com.globalmentor.collections
Class ObjectSet<E>
- java.lang.Object
-
- com.globalmentor.collections.ObjectSet<E>
-
- Type Parameters:
E
- The type of object contained in the set.
- All Implemented Interfaces:
ImmutableCollection<E>
,java.lang.Iterable<E>
,java.util.Collection<E>
,java.util.Set<E>
@Deprecated public class ObjectSet<E> extends java.lang.Object implements java.util.Set<E>, ImmutableCollection<E>
Deprecated.Replace withCollections.singleton(Object)
A read-only set containing a single object.- Author:
- Garret Wilson
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
add(E e)
Deprecated.boolean
addAll(java.util.Collection<? extends E> c)
Deprecated.void
clear()
Deprecated.boolean
contains(java.lang.Object o)
Deprecated.boolean
containsAll(java.util.Collection<?> c)
Deprecated.boolean
equals(java.lang.Object o)
Deprecated.int
hashCode()
Deprecated.boolean
isEmpty()
Deprecated.java.util.Iterator<E>
iterator()
Deprecated.boolean
remove(java.lang.Object o)
Deprecated.boolean
removeAll(java.util.Collection<?> c)
Deprecated.boolean
retainAll(java.util.Collection<?> c)
Deprecated.int
size()
Deprecated.java.lang.Object[]
toArray()
Deprecated.<T> T[]
toArray(T[] a)
Deprecated.java.lang.String
toString()
Deprecated.
-
-
-
Constructor Detail
-
ObjectSet
public ObjectSet(E object)
Deprecated.Object constructor.- Parameters:
object
- The object to hold in the set.- Throws:
java.lang.NullPointerException
- if the given object isnull
.
-
-
Method Detail
-
size
public int size()
Deprecated.
-
isEmpty
public boolean isEmpty()
Deprecated.
-
contains
public boolean contains(java.lang.Object o)
Deprecated.
-
iterator
public java.util.Iterator<E> iterator()
Deprecated.
-
toArray
public java.lang.Object[] toArray()
Deprecated.
-
toArray
public <T> T[] toArray(T[] a)
Deprecated.
-
add
public boolean add(E e)
Deprecated.
-
remove
public boolean remove(java.lang.Object o)
Deprecated.
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
Deprecated.
-
addAll
public boolean addAll(java.util.Collection<? extends E> c)
Deprecated.
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
Deprecated.
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
Deprecated.
-
clear
public void clear()
Deprecated.
-
equals
public boolean equals(java.lang.Object o)
Deprecated.
-
hashCode
public int hashCode()
Deprecated.
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classjava.lang.Object
-
-