Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.5.0)

E10653-06


oracle.jbo.server
Class SparseArray

java.lang.Object
  extended by oracle.jbo.server.SparseArray

All Implemented Interfaces:
SparseArrayInterface

public class SparseArray
extends java.lang.Object
implements SparseArrayInterface

The SparseArray represents Data from the datastore along with a flag whether data exists in a particular index into the array or not. This Array is designed for arrays that have small numbers of elements with a medium (200-400) spread on the indices. This array doesn't shrink the storage as tail-elements are removed because it assumes that the spread isn't very large.

Only ready only access is allowed to data within this class-instance.


Constructor Summary
SparseArray(int length)
           

 

Method Summary
 void clear(int index)
           
 java.lang.Object get(int index)
          Get the value at the specified index.
 boolean isEmpty()
           
 boolean isPopulated(int index)
          Is the slot populated.
 int length()
           
 void set(int index, java.lang.Object value)
          Set a value at a given index.
 SparseArray toSparseArray()
           
 java.lang.String toString()
          Default call, return at most ten entries.
 java.lang.String toString(int maxEntries)
          For debugging, returns a string representation of the SparseArray in the form {Object[i],...} with an upperlimit of maxEnties in the list (zero for all entries) Only place the ellipsis if entries are omitted.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

SparseArray

public SparseArray(int length)

Method Detail

length

public int length()

get

public java.lang.Object get(int index)
Get the value at the specified index.
Specified by:
get in interface SparseArrayInterface
Returns:
value at given index

set

public void set(int index,
                java.lang.Object value)
Set a value at a given index.
Specified by:
set in interface SparseArrayInterface
Parameters:
index - a 0-based index into the slots.
value - the value to set into the slot.

isPopulated

public boolean isPopulated(int index)
Is the slot populated.
Specified by:
isPopulated in interface SparseArrayInterface
Returns:
True if there is a value at the given index.

clear

public void clear(int index)
Specified by:
clear in interface SparseArrayInterface

toString

public java.lang.String toString(int maxEntries)
For debugging, returns a string representation of the SparseArray in the form {Object[i],...} with an upperlimit of maxEnties in the list (zero for all entries) Only place the ellipsis if entries are omitted.
Specified by:
toString in interface SparseArrayInterface

toString

public java.lang.String toString()
Default call, return at most ten entries.
Specified by:
toString in interface SparseArrayInterface
Overrides:
toString in class java.lang.Object

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface SparseArrayInterface

toSparseArray

public SparseArray toSparseArray()
Specified by:
toSparseArray in interface SparseArrayInterface

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.5.0)

E10653-06


Copyright © 1997, 2011, Oracle. All rights reserved.