org.javimmutable.collections.common
Class SetAdaptor<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<T>
org.javimmutable.collections.common.SetAdaptor<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
- Iterable<T>, Collection<T>, Set<T>
@Immutable
public class SetAdaptor<T>
- extends AbstractSet<T>
Adaptor that implements an unmodifiable Set backed by a PersistentSet.
SetAdaptor
public SetAdaptor(JImmutableSet<T> pset)
of
public static <T> SetAdaptor<T> of(JImmutableSet<T> pset)
contains
public boolean contains(Object o)
- Specified by:
contains
in interface Collection<T>
- Specified by:
contains
in interface Set<T>
- Overrides:
contains
in class AbstractCollection<T>
containsAll
public boolean containsAll(Collection<?> objects)
- Specified by:
containsAll
in interface Collection<T>
- Specified by:
containsAll
in interface Set<T>
- Overrides:
containsAll
in class AbstractCollection<T>
iterator
public Iterator<T> iterator()
- Specified by:
iterator
in interface Iterable<T>
- Specified by:
iterator
in interface Collection<T>
- Specified by:
iterator
in interface Set<T>
- Specified by:
iterator
in class AbstractCollection<T>
size
public int size()
- Specified by:
size
in interface Collection<T>
- Specified by:
size
in interface Set<T>
- Specified by:
size
in class AbstractCollection<T>
areEqual
public static <T> boolean areEqual(Set<T> a,
Set<T> b)
Copyright © 2014 Burton Computer Corporation. All rights reserved.