ch.javasoft.util.intcoll
Class AbstractIntCollection

java.lang.Object
  extended by ch.javasoft.util.intcoll.AbstractIntCollection
All Implemented Interfaces:
IntCollection, IntIterable, Iterable<Integer>, Collection<Integer>
Direct Known Subclasses:
AbstractIntList, AbstractSortedIntSet

public abstract class AbstractIntCollection
extends Object
implements IntCollection

Abstract pre-implementation of IntCollection.


Field Summary
protected  int mod
           
 
Constructor Summary
AbstractIntCollection()
           
AbstractIntCollection(int[] values)
           
AbstractIntCollection(IntCollection set)
           
 
Method Summary
 boolean add(Integer o)
           
 boolean addAll(Collection<? extends Integer> c)
           
 boolean addAll(int... values)
           
 boolean addAll(IntCollection coll)
           
abstract  boolean addInt(int value)
           
abstract  void clear()
           
 AbstractIntCollection clone()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> c)
           
 boolean containsInt(int value)
           
 boolean equals(Object obj)
           
 Integer first()
           
 int firstInt()
           
 int hashCode()
           
abstract  IntIterator intIterator()
           
 boolean isEmpty()
           
 Iterator<Integer> iterator()
           
 Integer last()
           
 int lastInt()
           
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
abstract  boolean removeInt(int value)
           
 boolean retainAll(Collection<?> c)
           
abstract  int size()
           
 Integer[] toArray()
           
<T> T[]
toArray(T[] arr)
           
protected
<T> T[]
toArrayInternal(T[] arr, boolean checkSize)
           
 int[] toIntArray()
           
 int[] toIntArray(int[] arr)
           
protected  int[] toIntArrayInternal(int[] arr, boolean checkSize)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

mod

protected transient int mod
Constructor Detail

AbstractIntCollection

public AbstractIntCollection()

AbstractIntCollection

public AbstractIntCollection(IntCollection set)

AbstractIntCollection

public AbstractIntCollection(int[] values)
Method Detail

size

public abstract int size()
Specified by:
size in interface Collection<Integer>

clear

public abstract void clear()
Specified by:
clear in interface Collection<Integer>

addInt

public abstract boolean addInt(int value)
Specified by:
addInt in interface IntCollection

removeInt

public abstract boolean removeInt(int value)
Specified by:
removeInt in interface IntCollection

intIterator

public abstract IntIterator intIterator()
Specified by:
intIterator in interface IntCollection
Specified by:
intIterator in interface IntIterable

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<Integer>

containsInt

public boolean containsInt(int value)
Specified by:
containsInt in interface IntCollection

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<Integer>

iterator

public Iterator<Integer> iterator()
Specified by:
iterator in interface Iterable<Integer>
Specified by:
iterator in interface Collection<Integer>

toArray

public Integer[] toArray()
Specified by:
toArray in interface Collection<Integer>

toArray

public <T> T[] toArray(T[] arr)
Specified by:
toArray in interface Collection<Integer>

toArrayInternal

protected <T> T[] toArrayInternal(T[] arr,
                                  boolean checkSize)

add

public boolean add(Integer o)
Specified by:
add in interface Collection<Integer>

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<Integer>

containsAll

public boolean containsAll(Collection<?> c)
Specified by:
containsAll in interface Collection<Integer>

addAll

public boolean addAll(Collection<? extends Integer> c)
Specified by:
addAll in interface Collection<Integer>

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<Integer>

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<Integer>

addAll

public boolean addAll(IntCollection coll)
Specified by:
addAll in interface IntCollection

addAll

public boolean addAll(int... values)
Specified by:
addAll in interface IntCollection

toIntArray

public int[] toIntArray()
Specified by:
toIntArray in interface IntCollection

toIntArray

public int[] toIntArray(int[] arr)
Specified by:
toIntArray in interface IntCollection

toIntArrayInternal

protected int[] toIntArrayInternal(int[] arr,
                                   boolean checkSize)

firstInt

public int firstInt()

first

public Integer first()

lastInt

public int lastInt()

last

public Integer last()

clone

public AbstractIntCollection clone()
Overrides:
clone in class Object

equals

public boolean equals(Object obj)
Specified by:
equals in interface Collection<Integer>
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection<Integer>
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object