org.abora.white.collection.arrays
Class SharedPtrArray

java.lang.Object
  |
  +--org.abora.white.xpp.basic.Heaper
        |
        +--org.abora.white.collection.arrays.PrimArray
              |
              +--org.abora.white.collection.arrays.PtrArray
                    |
                    +--org.abora.white.collection.arrays.SharedPtrArray

public class SharedPtrArray
extends PtrArray


Field Summary
 
Fields inherited from class org.abora.white.collection.arrays.PtrArray
storage
 
Constructor Summary
protected SharedPtrArray(Heaper[] buffer)
           
protected SharedPtrArray(int count)
           
protected SharedPtrArray(int size, PrimArray from, int sourceOffset, int count, int destOffset)
           
 
Method Summary
static PtrArray make(Heaper[] buffer)
          create a PtrArray filled with the data from 'buffer'
static PtrArray make(int count)
          create a PtrArray filled with NULLs
static PtrArray make(int size, PrimArray from)
           
static PtrArray make(int size, PrimArray from, int sourceOffset)
           
static PtrArray make(int size, PrimArray from, int sourceOffset, int count)
           
static PtrArray make(int size, PrimArray from, int sourceOffset, int count, int destOffset)
          create a SharedPtrArray filled with the indicated data in 'from'
static PtrArray make(PrimArray from)
           
protected  PrimArray makeNew(int size, PrimArray source, int sourceOffset, int count, int destOffset)
          Return a new array of the same type as this initialized with the elements of source specified by the index range, prepended by destOffset and postpended by null or 0 elements.
 int shareCount()
           
 void shareLess()
           
 void shareMore()
           
 PrimSpec spec()
          A description of the kinds of things which can be stored in this array
 
Methods inherited from class org.abora.white.collection.arrays.PtrArray
contentsEQ, contentsEqual, contentsHash, copyToBuffer, count, elementsEQ, elementsEQ, elementsEQ, elementsEqual, elementsHash, empty, fetch, fetchValue, get, indexOf, indexOfEQ, indexOfEQ, indexOfEQ, indexOfEQOrNull, indexOfEQOrNull, indexOfEQOrNull, indexPast, indexPastEQ, indexPastEQ, indexPastEQ, printElementOn, store, storeAll, storeValue, zeroElement
 
Methods inherited from class org.abora.white.collection.arrays.PrimArray
copy, copy, copy, copy, copy, copyElements, copyGrow, elementsEqual, elementsEqual, elementsHash, elementsHash, getValue, indexOf, indexOf, indexOfElements, indexOfElements, indexOfElements, indexOfElements, indexOfElements, indexPast, indexPast, isEqual, printOn, storeAll, storeAll, storeMany, storeMany, storeMany, zeroElements, zeroElements, zeroElements
 
Methods inherited from class org.abora.white.xpp.basic.Heaper
actualHashForEqual, destroy, destruct, equals, hashForEqual, printContentsOn, sendSelfTo, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SharedPtrArray

protected SharedPtrArray(int count)

SharedPtrArray

protected SharedPtrArray(int size,
                         PrimArray from,
                         int sourceOffset,
                         int count,
                         int destOffset)

SharedPtrArray

protected SharedPtrArray(Heaper[] buffer)
Method Detail

make

public static PtrArray make(int count)
create a PtrArray filled with NULLs


make

public static PtrArray make(int size,
                            PrimArray from,
                            int sourceOffset,
                            int count,
                            int destOffset)
create a SharedPtrArray filled with the indicated data in 'from'


make

public static PtrArray make(int size,
                            PrimArray from,
                            int sourceOffset,
                            int count)

make

public static PtrArray make(int size,
                            PrimArray from,
                            int sourceOffset)

make

public static PtrArray make(int size,
                            PrimArray from)

make

public static PtrArray make(PrimArray from)

make

public static PtrArray make(Heaper[] buffer)
create a PtrArray filled with the data from 'buffer'


makeNew

protected PrimArray makeNew(int size,
                            PrimArray source,
                            int sourceOffset,
                            int count,
                            int destOffset)
Description copied from class: PrimArray
Return a new array of the same type as this initialized with the elements of source specified by the index range, prepended by destOffset and postpended by null or 0 elements.

Overrides:
makeNew in class PtrArray
Parameters:
size - size of new array.
source - source of elements to be initialized with in the new array.
sourceOffset - first index of the source array to be included in the range.
count - number of elements of source to include in the new array
destOffset - first index of new array to be initialized with source elements.
Returns:
the new array.

spec

public PrimSpec spec()
Description copied from class: PrimArray
A description of the kinds of things which can be stored in this array

Overrides:
spec in class PtrArray

shareCount

public int shareCount()

shareLess

public void shareLess()

shareMore

public void shareMore()


Copyright © 2003 David G Jones. All Rights Reserved.
Original Udanax-Gold - Copyright © 1979-1999 Udanax.com. All rights reserved.