|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.nist.antd.optical.AbstractObject
This abstract superclass provides the array manipulation methods.
This interface was developed at the National Institute of Standards and Technology by employees of the Federal Government in the course of their official duties. Pursuant to title 17 Section 105 of the United States Code this software is not subject to copyright protection and is in the public domain. NIST assumes no responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic.
We would appreciate acknowledgement if the software is used.
NIST ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
| Field Summary | |
protected static int |
INITIAL_ARRAY_SIZE
The initial size of an array. |
| Constructor Summary | |
protected |
AbstractObject()
Default constructor. |
| Method Summary | |
protected boolean |
addElement(java.lang.Object element,
int elements,
java.lang.Object[] array)
Adds the specified Object to the given Array. |
protected void |
clear(java.lang.Object[] array)
set all elements in the array to null. |
protected abstract java.lang.Object[] |
createArray(int size)
Creates an array of the specified size. |
protected boolean |
isElementOf(java.lang.Object element,
java.lang.Object[] array)
Checks if the element is already in the array. |
protected boolean |
removeElement(java.lang.Object element,
int elements,
java.lang.Object[] array)
Removes the given element from the given array. |
protected abstract void |
setNoElements(int size)
Set the number of elements. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final int INITIAL_ARRAY_SIZE
| Constructor Detail |
protected AbstractObject()
| Method Detail |
protected boolean addElement(java.lang.Object element,
int elements,
java.lang.Object[] array)
element - The element to add.elements - The number of elements in the array.array - The array to add the element to.
protected boolean isElementOf(java.lang.Object element,
java.lang.Object[] array)
element - The element that is looking for.array - The array that will be examined.
protected void clear(java.lang.Object[] array)
array - The array to clear.protected abstract java.lang.Object[] createArray(int size)
size - the given size.
protected abstract void setNoElements(int size)
size - the new number of elements.
protected boolean removeElement(java.lang.Object element,
int elements,
java.lang.Object[] array)
element - The given element.elements - The number of elements in the array.array - The array the element has to be removed from.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||