org.idoox.wasp
Interface SparseArray

All Known Implementing Classes:
HashSparseArray

Deprecated. Sparse arrays are no longer supported.

public interface SparseArray

Represents a 'sparse' array, an array in which most elements have the default value.

Since:
4.0
Component:
Core-Backward-Compatible

Method Summary
 int[] getDimensions()
          Deprecated. Returns an array of dimensions.
 java.lang.Object getItem(int position)
          Deprecated. Returns item at the given position.
 java.lang.Object getItem(int[] position)
          Deprecated. Returns item at the given position.
 java.util.Iterator getPositions()
          Deprecated. Returns a set of positions.
 void setItem(int[] position, java.lang.Object value)
          Deprecated. Sets item at the given position.
 void setItem(int position, java.lang.Object value)
          Deprecated. Sets item at the given position.
 

Method Detail

getItem

public java.lang.Object getItem(int[] position)
Deprecated. 
Returns item at the given position. If there is no item at that position, null is returned.

Parameters:
position - the position
Returns:
item at that position or null if the position is unoccupied

getItem

public java.lang.Object getItem(int position)
Deprecated. 
Returns item at the given position. If there is no item at that position, null is returned. This is just a helper function for one dimensional case.

Parameters:
position - the position
Returns:
item at that position or null if the position is unoccupied

setItem

public void setItem(int[] position,
                    java.lang.Object value)
Deprecated. 
Sets item at the given position.

Parameters:
position - the position
value - the value to be set

setItem

public void setItem(int position,
                    java.lang.Object value)
Deprecated. 
Sets item at the given position. This is just a helper function for one dimensional case.

Parameters:
position - the position
value - the value to be set

getPositions

public java.util.Iterator getPositions()
Deprecated. 
Returns a set of positions. A position is represented as an array of ints.

Returns:
iterator of positions

getDimensions

public int[] getDimensions()
Deprecated. 
Returns an array of dimensions.

Returns:
the minimal dimensions of the array