Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Real-Time Decisions
11g Release 1 (11.1.1)

E17787-01


com.sigmadynamics.util
Class SDArray

java.lang.Object
  extended by com.sigmadynamics.util.SDArray

Direct Known Subclasses:
SDBooleanArray, SDChoiceArray, SDDoubleArray, SDGenericObjectArray, SDIntArray, SDLongArray, SDModelArray, SDObjectArray, SDPredictionContributionsArray, SDStringArray

public abstract class SDArray
extends java.lang.Object

This abstract class serves as a base for specialized SDArrayType classes.

See Also:
Serialized Form

Field Summary
protected static int ALLOC_UNIT
           
protected static int DEFAULT_INITIAL_SIZE
           
protected  int size
           

 

Constructor Summary
SDArray()
          Default constructor.

 

Method Summary
abstract  int capacity()
          Returns buffer capacity.
 void clear()
          Deletes all elements from the array.
protected abstract  void ensureCapacity(int capacity)
          Grows the internal buffer as needed to accomodate the specified number of elements.
 boolean isEmpty()
          Returns true if the array does not contain any elements, or false otherwise.
protected  void rangeCheck(int fromIndex, int toIndex)
          Checks if fromIndex and toIndex are in range, and throws an exception if any of them is not.
abstract  void setSize(int size)
          Adds or deletes elements at the end of the array.
 int size()
          Returns the number of elements in the array.
abstract  void trimToSize()
          Removes any excess buffer capacity above the actual number of elements.

 

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

 

Field Detail

ALLOC_UNIT

protected static final int ALLOC_UNIT
See Also:
Constant Field Values

DEFAULT_INITIAL_SIZE

protected static final int DEFAULT_INITIAL_SIZE
See Also:
Constant Field Values

size

protected int size

Constructor Detail

SDArray

public SDArray()
Default constructor.

Method Detail

size

public final int size()
Returns the number of elements in the array.
Returns:
the number of elements.

isEmpty

public final boolean isEmpty()
Returns true if the array does not contain any elements, or false otherwise.
Returns:
true or false depending on whether the array is empty or not.

capacity

public abstract int capacity()
Returns buffer capacity.
Returns:
buffer capacity.

setSize

public abstract void setSize(int size)
Adds or deletes elements at the end of the array.
Parameters:
size - new number or elements.

clear

public void clear()
Deletes all elements from the array.

trimToSize

public abstract void trimToSize()
Removes any excess buffer capacity above the actual number of elements.

ensureCapacity

protected abstract void ensureCapacity(int capacity)
Grows the internal buffer as needed to accomodate the specified number of elements.
Parameters:
capacity - number of elements to accomodate.

rangeCheck

protected void rangeCheck(int fromIndex,
                          int toIndex)
Checks if fromIndex and toIndex are in range, and throws an exception if any of them is not. This method is not a part of public API and should not be used by Inline Service code.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Real-Time Decisions
11g Release 1 (11.1.1)

E17787-01


Copyright © 2010, Oracle. All rights reserved.