scranton
Class ArraySupport
java.lang.Object
scranton.ArraySupport
- public class ArraySupport
- extends java.lang.Object
Support the process of inserting (in) or removing (out) an object for a collection
in an array at the indicated position and moving the remaining objects to adjust
for the insertion or removal
|
Method Summary |
void |
arrayInsert(java.lang.Object[] a,
int in,
int actual,
java.lang.Object O)
Insert an object into the array at the indicated position and move the
objects at the position or following it to make room for the move. |
java.lang.Object |
arrayRemove(java.lang.Object[] a,
int out,
int actual)
Remove the object at a[out] and move the
following objects to shrink the number of objects by one. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArraySupport
public ArraySupport()
arrayInsert
public void arrayInsert(java.lang.Object[] a,
int in,
int actual,
java.lang.Object O)
- Insert an object into the array at the indicated position and move the
objects at the position or following it to make room for the move.
- Parameters:
a - The array of objectsin - Where the new object is to be placedactual - The number of objects in the array a[0...actual)O - The objects that is inserted in a[in]
arrayRemove
public java.lang.Object arrayRemove(java.lang.Object[] a,
int out,
int actual)
- Remove the object at a[out] and move the
following objects to shrink the number of objects by one.
- Parameters:
a - The array of objectsout - Where the new object is to be placedactual - The number of objects in the array a[0...actual)
- Returns:
- The objects that was at a[out]