All Packages Class Hierarchy This Package Previous Next Index
Class COM.objectspace.jgl.adapters.DoubleArray
java.lang.Object
|
+----COM.objectspace.jgl.adapters.ArrayAdapter
|
+----COM.objectspace.jgl.adapters.DoubleArray
- public class DoubleArray
- extends ArrayAdapter
DoubleArray allows a native array of doubles to be accessed like a JGL
Container. It is particularly useful for applying generic algorithms
such as Sorting.sort() to a native array.
-
DoubleArray()
- Construct myself to refer to an empty array.
-
DoubleArray(double[])
- Construct myself to refer to a native Java array.
-
DoubleArray(DoubleArray)
- Construct myself to refer to an existing DoubleArray.
-
DoubleArray(DoubleBuffer)
- Construct myself to be a copy of an existing DoubleBuffer.
-
at(int)
- Return the integer at the specified index as a Double object.
-
begin()
- Return an iterator positioned at my first item.
-
clone()
- Return a shallow copy of myself.
-
doubleAt(int)
- Return the integer at the specified index as a Double object.
-
elements()
- Return an Enumeration of my components.
-
end()
- Return an iterator positioned immediately after my last item.
-
equals(double[])
- Return true if I contain the same items in the same order as
a native array of doubles.
-
equals(DoubleArray)
- Return true if I contain the same items in the same order as
another DoubleArray.
-
equals(DoubleBuffer)
- Return true if I contain the same items in the same order as
another DoubleBuffer.
-
equals(Object)
- Return true if I'm equal to a specified object.
-
finish()
- Return an iterator positioned immediately after my last item.
-
get()
- Retrieve the underlying primitive array.
-
maxSize()
- Return the maximum number of objects that I can contain.
-
put(int, double)
- Set the value of a specified index.
-
put(int, Object)
- Set the object at a specified index.
-
size()
- Return the number of objects that I contain.
-
start()
- Return an iterator positioned at my first item.
-
toString()
- Return a string that describes me.
DoubleArray
public DoubleArray()
- Construct myself to refer to an empty array.
DoubleArray
public DoubleArray(DoubleArray array)
- Construct myself to refer to an existing DoubleArray.
- Parameters:
- array - The DoubleArray to copy.
DoubleArray
public DoubleArray(DoubleBuffer buffer)
- Construct myself to be a copy of an existing DoubleBuffer.
- Parameters:
- array - The DoubleBuffer to copy.
DoubleArray
public DoubleArray(double array[])
- Construct myself to refer to a native Java array.
- Parameters:
- array - The double[] to ape.
clone
public synchronized Object clone()
- Return a shallow copy of myself.
- Overrides:
- clone in class ArrayAdapter
toString
public synchronized String toString()
- Return a string that describes me.
- Overrides:
- toString in class Object
equals
public boolean equals(Object object)
- Return true if I'm equal to a specified object.
- Parameters:
- object - The object to compare myself against.
- Returns:
- true if I'm equal to the specified object.
- Overrides:
- equals in class ArrayAdapter
equals
public boolean equals(DoubleArray object)
- Return true if I contain the same items in the same order as
another DoubleArray.
- Parameters:
- array - The DoubleArray to compare myself against.
- Returns:
- true if I'm equal to the specified object.
equals
public boolean equals(DoubleBuffer buffer)
- Return true if I contain the same items in the same order as
another DoubleBuffer.
- Parameters:
- buffer - The DoubleBuffer to compare myself against.
equals
public synchronized boolean equals(double array[])
- Return true if I contain the same items in the same order as
a native array of doubles.
- Parameters:
- array - The array to compare myself against.
get
public double[] get()
- Retrieve the underlying primitive array.
size
public int size()
- Return the number of objects that I contain.
- Overrides:
- size in class ArrayAdapter
maxSize
public int maxSize()
- Return the maximum number of objects that I can contain.
- Overrides:
- maxSize in class ArrayAdapter
elements
public Enumeration elements()
- Return an Enumeration of my components.
- Overrides:
- elements in class ArrayAdapter
start
public ForwardIterator start()
- Return an iterator positioned at my first item.
- Overrides:
- start in class ArrayAdapter
begin
public synchronized DoubleIterator begin()
- Return an iterator positioned at my first item.
finish
public ForwardIterator finish()
- Return an iterator positioned immediately after my last item.
- Overrides:
- finish in class ArrayAdapter
end
public synchronized DoubleIterator end()
- Return an iterator positioned immediately after my last item.
at
public Object at(int index)
- Return the integer at the specified index as a Double object.
- Parameters:
- index - The index.
- Overrides:
- at in class ArrayAdapter
doubleAt
public synchronized double doubleAt(int index)
- Return the integer at the specified index as a Double object.
- Parameters:
- index - The index.
put
public void put(int index,
Object object)
- Set the object at a specified index. The object must be a Number
- Parameters:
- index - The index.
- object - The object to place at the specified index.
- Throws: ClassCastException
- if object is not a Number
- Throws: IndexOutOfBoundsException
- if index is invalid.
- Overrides:
- put in class ArrayAdapter
put
public synchronized void put(int index,
double object)
- Set the value of a specified index.
- Parameters:
- index - The index.
- object - The double to place at the specified index.
- Throws: IndexOutOfBoundsException
- if index is invalid.
All Packages Class Hierarchy This Package Previous Next Index