Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.util
Class AbstractLongArray

    java.lang.Object
      com.tangosol.util.Base
          com.tangosol.util.AbstractLongArray

All Implemented Interfaces:
  LongArray, java.io.Serializable, java.lang.Cloneable

Direct Known Subclasses:
  AbstractSparseArray, SimpleLongArray

    public abstract class AbstractLongArray

extends Base
implements LongArray

An implementation of portions of the LongArray interface.

Version:
  1.00 2002.04.24
Author:
  cp

Nested Class Summary

Nested classes/interfaces inherited from interface com.tangosol.util.LongArray
`LongArray.Iterator`

Field Summary

Fields inherited from interface com.tangosol.util.LongArray
`NOT_FOUND`

Constructor Summary
`AbstractLongArray()`

Method Summary
`long` | `add(java.lang.Object oValue)` Add the passed element value to the LongArray and return the index at which the element value was stored.
`void` | `clear()` Remove all nodes from the LongArray.
`java.lang.Object` | `clone()` Make a clone of the LongArray.
`boolean` | `contains(java.lang.Object o)` Determine if the LongArray contains the specified element.
`boolean` | `equals(java.lang.Object o)` Test for LongArray equality.
`boolean` | `exists(long lIndex)` Determine if the specified index is in use.
`java.lang.Object` | `get(long lIndex)` Return the value stored at the specified index.
`long` | `getFirstIndex()` Determine the first index that exists in the LongArray.
`long` | `getLastIndex()` Determine the last index that exists in the LongArray.
`int` | `getSize()` Determine the size of the LongArray.
`long` | `indexOf(java.lang.Object oValue)` Return the index in this LongArray of the first occurrence of the specified element, or NOT_FOUND if this LongArray does not contain the specified element.
`long` | `indexOf(java.lang.Object oValue, long lIndex)` Return the index in this LongArray of the first occurrence of the specified element such that `(index >= lIndex)`, or NOT_FOUND if this LongArray does not contain the specified element.
`boolean` | `isEmpty()` Test for empty LongArray.
`long` | `lastIndexOf(java.lang.Object oValue)` Return the index in this LongArray of the last occurrence of the specified element, or NOT_FOUND if this LongArray does not contain the specified element.
`long` | `lastIndexOf(java.lang.Object oValue, long lIndex)` Return the index in this LongArray of the last occurrence of the specified element such that `(index <= lIndex)`, or NOT_FOUND if this LongArray does not contain the specified element.
`java.lang.Object` | `remove(long lIndex)` Remove the specified key from the SparseArray, returning its associated value.
`java.lang.String` | `toString()` Provide a string representation of the LongArray.

Methods inherited from interface com.tangosol.util.LongArray
`iterator, iterator, reverseIterator, reverseIterator, set`

Constructor Detail

### AbstractLongArray

    public AbstractLongArray()

Method Detail

### get

    public java.lang.Object get(long lIndex)

  Return the value stored at the specified index.

  Specified by:
    `get` in interface `LongArray`
  Parameters:
    `lIndex` - a long index value
  Returns:
    the object stored at the specified index, or null

### add

    public long add(java.lang.Object oValue)

  Add the passed element value to the LongArray and return the index at which the element value was stored.

  Specified by:
    `add` in interface `LongArray`
  Parameters:
    `oValue` - the object to add to the LongArray
  Returns:
    the long index value at which the element value was stored

### exists

    public boolean exists(long lIndex)

  Determine if the specified index is in use.

  Specified by:
    `exists` in interface `LongArray`
  Parameters:
    `lIndex` - a long index value
  Returns:
    true if a value (including null) is stored at the specified index, otherwise false

### remove

    public java.lang.Object remove(long lIndex)

  Remove the specified key from the SparseArray, returning its associated value.

  Specified by:
    `remove` in interface `LongArray`
  Parameters:
    `lIndex` - the index of the key to look for in the SparseArray
  Returns:
    the associated value (which can be null) or null if the key is not in the SparseArray

### contains

    public boolean contains(java.lang.Object o)

  Determine if the LongArray contains the specified element.

  More formally, returns `true` if and only if this LongArray contains at least one element `e` such that `(o==null ? e==null : o.equals(e))`.

  Specified by:
    `contains` in interface `LongArray`
  Parameters:
    `o` - element whose presence in this list is to be tested
  Returns:
    `true` if this list contains the specified element

### clear

    public void clear()

  Remove all nodes from the LongArray.

  Specified by:
    `clear` in interface `LongArray`

### isEmpty

    public boolean isEmpty()

  Test for empty LongArray.

  Specified by:
    `isEmpty` in interface `LongArray`
  Returns:
    true if LongArray has no nodes

### getSize

    public int getSize()

  Determine the size of the LongArray.

  Specified by:
    `getSize` in interface `LongArray`
  Returns:
    the number of nodes in the LongArray

### getFirstIndex

    public long getFirstIndex()

  Determine the first index that exists in the LongArray.

  Specified by:
    `getFirstIndex` in interface `LongArray`
  Returns:
    the lowest long value that exists in this LongArray, or NOT_FOUND if the LongArray is empty

### getLastIndex

    public long getLastIndex()

  Determine the last index that exists in the LongArray.

  Specified by:
    `getLastIndex` in interface `LongArray`
  Returns:
    the highest long value that exists in this LongArray, or NOT_FOUND if the LongArray is empty

### indexOf

    public long indexOf(java.lang.Object oValue)

  Return the index in this LongArray of the first occurrence of the specified element, or NOT_FOUND if this LongArray does not contain the specified element.

  Specified by:
    `indexOf` in interface `LongArray`

### indexOf

    public long indexOf(java.lang.Object oValue,
                        long lIndex)

  Return the index in this LongArray of the first occurrence of the specified element such that `(index >= lIndex)`, or NOT_FOUND if this LongArray does not contain the specified element.

  Specified by:
    `indexOf` in interface `LongArray`

### lastIndexOf

    public long lastIndexOf(java.lang.Object oValue)

  Return the index in this LongArray of the last occurrence of the specified element, or NOT_FOUND if this LongArray does not contain the specified element.

  Specified by:
    `lastIndexOf` in interface `LongArray`

### lastIndexOf

    public long lastIndexOf(java.lang.Object oValue,
                            long lIndex)

  Return the index in this LongArray of the last occurrence of the specified element such that `(index <= lIndex)`, or NOT_FOUND if this LongArray does not contain the specified element.

  Specified by:
    `lastIndexOf` in interface `LongArray`

### toString

    public java.lang.String toString()

  Provide a string representation of the LongArray.

  Specified by:
    `toString` in interface `LongArray`
  Returns:
    a human-readable String value describing the LongArray instance

### equals

    public boolean equals(java.lang.Object o)

  Test for LongArray equality.

  Specified by:
    `equals` in interface `LongArray`
  Parameters:
    `o` - an Object to compare to this LongArray for equality
  Returns:
    true if the passed Object is a LongArray containing the same indexes and whose elements at those indexes are equal

### clone

    public java.lang.Object clone()

  Make a clone of the LongArray. The element values are not deep-cloned.

  Specified by:
    `clone` in interface `LongArray`
  Returns:
    a clone of this LongArray object

Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle. All rights reserved.