net.sf.oval.internal.util
Class LinkedSet<E>

java.lang.Object
  extended by net.sf.oval.internal.util.LinkedSet<E>
All Implemented Interfaces:
Cloneable, Iterable<E>, Collection<E>, List<E>, Set<E>

public final class LinkedSet<E>
extends Object
implements Cloneable, Set<E>, List<E>

Author:
Sebastian Thomschke

Constructor Summary
LinkedSet()
          Constructs a new, empty collection with an initial capacity (16).
LinkedSet(int initialCapacity)
          Constructs a new, empty collection with the given initial capacity.
 
Method Summary
 boolean add(E e)
          
 void add(int index, E e)
          
 boolean addAll(Collection<? extends E> c)
          
 boolean addAll(int index, Collection<? extends E> c)
          
 void clear()
          
 Object clone()
          
 boolean contains(Object o)
          
 boolean containsAll(Collection<?> c)
          
 boolean equals(Object obj)
          
 E get(int index)
          
 int hashCode()
          
 int indexOf(Object o)
          
 boolean isEmpty()
          
 Iterator<E> iterator()
          
 int lastIndexOf(Object o)
          
 ListIterator<E> listIterator()
          
 ListIterator<E> listIterator(int index)
          
 E remove(int index)
          
 boolean remove(Object o)
          
 boolean removeAll(Collection<?> c)
          
 boolean retainAll(Collection<?> c)
          
 E set(int index, E element)
          
 int size()
          
 List<E> subList(int fromIndex, int toIndex)
          
 Object[] toArray()
          
<T> T[]
toArray(T[] a)
          
 String toString()
          
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinkedSet

public LinkedSet()
Constructs a new, empty collection with an initial capacity (16).


LinkedSet

public LinkedSet(int initialCapacity)
Constructs a new, empty collection with the given initial capacity.

Parameters:
initialCapacity - the initial capacity
Method Detail

add

public boolean add(E e)

Specified by:
add in interface Collection<E>
Specified by:
add in interface List<E>
Specified by:
add in interface Set<E>

add

public void add(int index,
                E e)

Specified by:
add in interface List<E>

addAll

public boolean addAll(Collection<? extends E> c)

Specified by:
addAll in interface Collection<E>
Specified by:
addAll in interface List<E>
Specified by:
addAll in interface Set<E>

addAll

public boolean addAll(int index,
                      Collection<? extends E> c)

Specified by:
addAll in interface List<E>

clear

public void clear()

Specified by:
clear in interface Collection<E>
Specified by:
clear in interface List<E>
Specified by:
clear in interface Set<E>

clone

public Object clone()
             throws CloneNotSupportedException

Overrides:
clone in class Object
Throws:
CloneNotSupportedException

contains

public boolean contains(Object o)

Specified by:
contains in interface Collection<E>
Specified by:
contains in interface List<E>
Specified by:
contains in interface Set<E>

containsAll

public boolean containsAll(Collection<?> c)

Specified by:
containsAll in interface Collection<E>
Specified by:
containsAll in interface List<E>
Specified by:
containsAll in interface Set<E>

equals

public boolean equals(Object obj)

Specified by:
equals in interface Collection<E>
Specified by:
equals in interface List<E>
Specified by:
equals in interface Set<E>
Overrides:
equals in class Object

get

public E get(int index)

Specified by:
get in interface List<E>

hashCode

public int hashCode()

Specified by:
hashCode in interface Collection<E>
Specified by:
hashCode in interface List<E>
Specified by:
hashCode in interface Set<E>
Overrides:
hashCode in class Object

indexOf

public int indexOf(Object o)

Specified by:
indexOf in interface List<E>

isEmpty

public boolean isEmpty()

Specified by:
isEmpty in interface Collection<E>
Specified by:
isEmpty in interface List<E>
Specified by:
isEmpty in interface Set<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 List<E>
Specified by:
iterator in interface Set<E>

lastIndexOf

public int lastIndexOf(Object o)

Specified by:
lastIndexOf in interface List<E>

listIterator

public ListIterator<E> listIterator()

Specified by:
listIterator in interface List<E>

listIterator

public ListIterator<E> listIterator(int index)

Specified by:
listIterator in interface List<E>

remove

public E remove(int index)

Specified by:
remove in interface List<E>

remove

public boolean remove(Object o)

Specified by:
remove in interface Collection<E>
Specified by:
remove in interface List<E>
Specified by:
remove in interface Set<E>

removeAll

public boolean removeAll(Collection<?> c)

Specified by:
removeAll in interface Collection<E>
Specified by:
removeAll in interface List<E>
Specified by:
removeAll in interface Set<E>

retainAll

public boolean retainAll(Collection<?> c)

Specified by:
retainAll in interface Collection<E>
Specified by:
retainAll in interface List<E>
Specified by:
retainAll in interface Set<E>

set

public E set(int index,
             E element)

Specified by:
set in interface List<E>

size

public int size()

Specified by:
size in interface Collection<E>
Specified by:
size in interface List<E>
Specified by:
size in interface Set<E>

subList

public List<E> subList(int fromIndex,
                       int toIndex)

Specified by:
subList in interface List<E>

toArray

public Object[] toArray()

Specified by:
toArray in interface Collection<E>
Specified by:
toArray in interface List<E>
Specified by:
toArray in interface Set<E>

toArray

public <T> T[] toArray(T[] a)

Specified by:
toArray in interface Collection<E>
Specified by:
toArray in interface List<E>
Specified by:
toArray in interface Set<E>

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2005-2013 The OVal Development Team. All Rights Reserved.