Business Objects
Quark Platform Documentation
Version 1.7.0_0
Business Objects

org.openquark.cal.util
Class ArraySet<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<E>
          extended by org.openquark.cal.util.ArraySet<E>
All Implemented Interfaces:
Iterable<E>, Collection<E>, Set<E>

public final class ArraySet<E>
extends AbstractSet<E>

A Set whose elements are ordered by the insertion order of elements in the set. This class allows both O(1) membership testing (like HashSet) and O(1) indexing (like ArrayList). The optional Set interface methods addAll, remove, removeAll and retailAll throw an UnsupportedOperationException. This Set does not support null elements. Creation date (Nov 2, 2005).

Author:
Bo Ilic

Constructor Summary
ArraySet()
           
 
Method Summary
 boolean add(E object)
           
 boolean addAll(Collection<? extends E> c)
           
 void clear()
           
 boolean contains(Object o)
           
 E get(int index)
           
 int indexOf(Object o)
           
 Iterator<E> iterator()
           
 int lastIndexOf(Object o)
           
 ListIterator<E> listIterator()
          Functions according to the specification of the List.listIterator() interface method.
 ListIterator<E> listIterator(int index)
          Functions according to the specification of the List.listIterator(int) interface method.
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 int size()
           
 Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 String toString()
           
 
Methods inherited from class java.util.AbstractSet
equals, hashCode
 
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
containsAll, isEmpty
 

Constructor Detail

ArraySet

public ArraySet()
Method Detail

add

public boolean add(E object)
Specified by:
add in interface Collection<E>
Specified by:
add in interface Set<E>
Overrides:
add in class AbstractCollection<E>

clear

public void clear()
Specified by:
clear in interface Collection<E>
Specified by:
clear in interface Set<E>
Overrides:
clear in class AbstractCollection<E>

size

public int size()
Specified by:
size in interface Collection<E>
Specified by:
size in interface Set<E>
Specified by:
size in class AbstractCollection<E>

iterator

public Iterator<E> iterator()
Specified by:
iterator in interface Iterable<E>
Specified by:
iterator in interface Collection<E>
Specified by:
iterator in interface Set<E>
Specified by:
iterator in class AbstractCollection<E>
Returns:
the Iterator returned does not support the optional remove method.

listIterator

public ListIterator<E> listIterator()
Functions according to the specification of the List.listIterator() interface method.

Returns:
the ListIterator returned does not support the optional remove, add and set methods.

listIterator

public ListIterator<E> listIterator(int index)
Functions according to the specification of the List.listIterator(int) interface method.

Returns:
the ListIterator returned does not support the optional remove, add and set methods.

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<E>
Specified by:
contains in interface Set<E>
Overrides:
contains in class AbstractCollection<E>

toString

public String toString()
Overrides:
toString in class AbstractCollection<E>

get

public E get(int index)

indexOf

public int indexOf(Object o)

lastIndexOf

public int lastIndexOf(Object o)

addAll

public boolean addAll(Collection<? extends E> c)
Specified by:
addAll in interface Collection<E>
Specified by:
addAll in interface Set<E>
Overrides:
addAll in class AbstractCollection<E>

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<E>
Specified by:
remove in interface Set<E>
Overrides:
remove in class AbstractCollection<E>

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<E>
Specified by:
removeAll in interface Set<E>
Overrides:
removeAll in class AbstractSet<E>

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<E>
Specified by:
retainAll in interface Set<E>
Overrides:
retainAll in class AbstractCollection<E>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<E>
Specified by:
toArray in interface Set<E>
Overrides:
toArray in class AbstractCollection<E>

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface Collection<E>
Specified by:
toArray in interface Set<E>
Overrides:
toArray in class AbstractCollection<E>

Business Objects
Quark Platform Documentation
Version 1.7.0_0
Business Objects

Copyright © 2007 Business Objects. All rights reserved.