 
  | JGL - The Generic Collection Library for Java | 
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class com.objectspace.jgl.adapters.ArrayAdapter
java.lang.Object
   |
   +----com.objectspace.jgl.adapters.ArrayAdapter
  -  public abstract class ArrayAdapter
  
-  extends Object
  
-  implements Sequence
  
-  super class of:
    
    -  BooleanArray, BooleanBuffer, ByteArray, CharArray, DoubleArray, FloatArray, IntArray, LongArray, ObjectArray, ShortArray, VectorArray
		
 
ArrayAdapter is the base class of all array adapters, including those
 that adapt the JDK Vector and Java native arrays.
 
    -  See Also:
    
 -  BooleanArray, ByteArray, CharArray, DoubleArray, FloatArray, IntArray, LongArray, ObjectArray, ShortArray, VectorArray
 
  
  -  
	ArrayAdapter()
   -  
 
  
  -  
	add(Object)
   -   Add an object to myself.
  
 -  
	back()
   -   Return my last element.
  
 -  
	checkIndex(int, int)
   -  
  
 -  
	checkRange(int, int, int)
   -  
  
 -  
	clear()
   -   Remove all of my objects.
  
 -  
	clone()
   -  
  
 -  
	contains(Object)
   -   Return true if I contain a particular object using .equals()
 
  
 -  
	count(int, int, Object)
   -   Return the number of objects within a specified range of that match a
 particular value.
  
 -  
	count(Object)
   -   Return the number of objects that match a specified object.
  
 -  
	equals(Object)
   -  
  
 -  
	front()
   -   Return my first element.
  
 -  
	hashCode()
   -   Return my hash code for support of hashing containers
  
 -  
	indexOf(int, int, Object)
   -   Return an index positioned at the first object within a specified range that
 matches a particular object, or -1 if the object is not found.
  
 -  
	indexOf(Object)
   -   Return the index of the first object that matches a particular value, or
 -1 if the object is not found.
  
 -  
	isEmpty()
   -   Return true if I contain no objects.
  
 -  
	maxSize()
   -   Return the maximum number of entries that I can contain.
  
 -  
	popBack()
   -   Remove and return my last element.
  
 -  
	popFront()
   -   Remove and return my first element.
  
 -  
	pushBack(Object)
   -   Add an object at my end.
  
 -  
	pushFront(Object)
   -   Insert an object in front of my first element.
  
 -  
	remove(Enumeration)
   -   Remove the element at a particular position.
  
 -  
	remove(Enumeration, Enumeration)
   -   Remove the elements in the specified range.
  
 -  
	remove(int, int, Object)
   -   Remove all elements within a specified range that match a particular object
 and return the number of objects that were removed.
  
 -  
	remove(Object)
   -   Remove all elements that match a specified object and return the number of
 objects that were removed.
  
 -  
	remove(Object, int)
   -   Remove at most a given number of elements that match a specified object and return the number of
 objects that were removed.
  
 -  
	replace(int, int, Object, Object)
   -   Replace all elements within a specified range that match a particular object
 with a new value and return the number of objects that were replaced.
  
 -  
	replace(Object, Object)
   -   Replace all elements that match a particular object with a new value and return
 the number of objects that were replaced.
 
  
ArrayAdapter
 public ArrayAdapter()
  
clone
 public Object clone()
  
    -  Overrides:
    
 -  clone in class Object
  
 
 
equals
 public boolean equals(Object object)
  
    -  Overrides:
    
 -  equals in class Object
  
 
 
hashCode
 public synchronized int hashCode()
  -  Return my hash code for support of hashing containers
  
    -  Overrides:
    
 -  hashCode in class Object
  
 
 
 
isEmpty
 public boolean isEmpty()
  -  Return true if I contain no objects.
 
back
 public Object back()
  -  Return my last element.
 
front
 public Object front()
  -  Return my first element.
 
count
 public int count(Object object)
  -  Return the number of objects that match a specified object.
  
    -  Parameters:
    
 -  object - The object to count.
  
 
 
 
count
 public synchronized int count(int first,
                               int last,
                               Object object)
  -  Return the number of objects within a specified range of that match a
 particular value.  the range is inclusive
  
    -  Parameters:
    
 -  first - The index of the first object to consider.
    
-  last - The index of the last object to consider.
    
  -  Throws: IndexOutOfBoundsException
    
 -  If either index is invalid.
  
 
 
 
replace
 public int replace(Object oldValue,
                    Object newValue)
  -  Replace all elements that match a particular object with a new value and return
 the number of objects that were replaced.
  
    -  Parameters:
    
 -  oldValue - The object to be replaced.
    
-  newValue - The value to substitute.
  
  
 
 
replace
 public synchronized int replace(int first,
                                 int last,
                                 Object oldValue,
                                 Object newValue)
  -  Replace all elements within a specified range that match a particular object
 with a new value and return the number of objects that were replaced.
  
    -  Parameters:
    
 -  first - The index of the first object to be considered.
    
-  last - The index of the last object to be considered.
    
-  oldValue - The object to be replaced.
    
-  newValue - The value to substitute.
    
    -  Throws: IndexOutOfBoundsException
    
 -  If either index is invalid.
  
 
 
 
contains
 public boolean contains(Object object)
  -  Return true if I contain a particular object using .equals()
  
    -  Parameters:
    
 -  object - The object in question.
  
 
 
 
indexOf
 public int indexOf(Object object)
  -  Return the index of the first object that matches a particular value, or
 -1 if the object is not found.  Uses .equals() to find a match
  
    -  Parameters:
    
 -  object - The object to find.
    
 -  Throws: ClassCastException
    
 -  if objects are not Boolean
  
 
 
 
indexOf
 public synchronized int indexOf(int first,
                                 int last,
                                 Object object)
  -  Return an index positioned at the first object within a specified range that
 matches a particular object, or -1 if the object is not found.
  
    -  Parameters:
    
 -  first - The index of the first object to consider.
    
-  last - The index of the last object to consider.
    
-  object - The object to find.
    
   -  Throws: IndexOutOfBoundsException
    
 -  If either index is invalid.
    
 -  Throws: ClassCastException
    
 -  if objects are not Boolean
  
 
 
 
clear
 public void clear()
  -  Remove all of my objects. By default, this method throws an exception.
  
    -  Throws: InvalidOperationException
    
 -  Thrown by default.
  
 
 
 
add
 public Object add(Object object)
  -  Add an object to myself. By default, this method throws an exception.
  
    -  Parameters:
    
 -  object - The object to add.
    
 -  Throws: InvalidOperationException
    
 -  Thrown by default.
  
 
 
 
pushFront
 public void pushFront(Object object)
  -  Insert an object in front of my first element. By default, this method throws
 an exception.
  
    -  Parameters:
    
 -  object - The object to insert.
    
 -  Throws: InvalidOperationException
    
 -  Thrown by default.
  
 
 
 
popFront
 public Object popFront()
  -  Remove and return my first element. By default, this method throws an exception.
  
    -  Throws: InvalidOperationException
    
 -  Thrown by default.
  
 
 
 
pushBack
 public void pushBack(Object object)
  -  Add an object at my end. By default, this method throws an exception.
  
    -  Parameters:
    
 -  object - The object to add.
    
 -  Throws: InvalidOperationException
    
 -  Thrown by default.
  
 
 
 
popBack
 public Object popBack()
  -  Remove and return my last element. By default, this method throws an exception.
  
    -  Throws: InvalidOperationException
    
 -  Thrown by default.
  
 
 
 
remove
 public Object remove(Enumeration pos)
  -  Remove the element at a particular position.
  
    -  Parameters:
    
 -  pos - The enumeration representing of the object to remove.
    
 -  Throws: InvalidOperationException
    
 -  Thrown by default.
  
 
 
 
remove
 public int remove(Enumeration first,
                   Enumeration last)
  -  Remove the elements in the specified range.
  
    -  Parameters:
    
 -  pos - The enumeration representing of the object to remove.
    
 -  Throws: InvalidOperationException
    
 -  Thrown by default.
  
 
 
 
remove
 public int remove(Object object)
  -  Remove all elements that match a specified object and return the number of
 objects that were removed. By default, this method throws an exception.
  
    -  Parameters:
    
 -  object - The object to remove.
    
 -  Throws: InvalidOperationException
    
 -  Thrown by default.
  
 
 
 
remove
 public int remove(Object object,
                   int count)
  -  Remove at most a given number of elements that match a specified object and return the number of
 objects that were removed. By default, this method throws an exception.
  
    -  Parameters:
    
 -  object - The object to remove.
    
-  count - The maximum number of objects to remove.
    
  -  Throws: InvalidOperationException
    
 -  Thrown by default.
  
 
 
 
remove
 public int remove(int first,
                   int last,
                   Object object)
  -  Remove all elements within a specified range that match a particular object
 and return the number of objects that were removed. By default, this method throws
 an exception.
  
    -  Parameters:
    
 -  first - The index of the first object to remove.
    
-  last - The index of the last object to remove.
    
-  object - The object to remove.
    
   -  Throws: IndexOutOfBoundsException
    
 -  Thrown by default.
  
 
 
 
maxSize
 public int maxSize()
  -  Return the maximum number of entries that I can contain.
 
checkIndex
 protected static final void checkIndex(int i,
                                        int size)
checkRange
 protected static final void checkRange(int lo,
                                        int hi,
                                        int size)
All Packages  Class Hierarchy  This Package  Previous  Next  Index