Show / Hide Table of Contents

Interface ILongArray

An interface, similar in its methods to IList, and similar in its purpose to an array, designed for sparse storage and indexed by long values.

Namespace: Tangosol.Util
Assembly: Coherence.Core.dll
Syntax
public interface ILongArray
Remarks

Unlike the IList interface, the ILongArray interface assumes that every valid index (i.e. greater than or equal to zero) can be accessed and has storage available.

Properties

| Improve this Doc View Source

Count

Determine the size of the ILongArray.

Declaration
int Count { get; }
Property Value
Type Description
System.Int32

The number of elements in the ILongArray.

| Improve this Doc View Source

FirstIndex

Determine the first index that exists in the ILongArray.

Declaration
long FirstIndex { get; }
Property Value
Type Description
System.Int64

The lowest long value, 0 <= n <= Int64.MaxValue, that exists in this ILongArray, or -1 if the ILongArray is empty.

| Improve this Doc View Source

IsEmpty

Determine if ILongArray is empty.

Declaration
bool IsEmpty { get; }
Property Value
Type Description
System.Boolean

true if ILongArray has no elements.

| Improve this Doc View Source

Item[Int64]

The value stored at the specified index.

Declaration
object this[long index] { get; set; }
Parameters
Type Name Description
System.Int64 index

A long index value.

Property Value
Type Description
System.Object

The object stored at the specified index, or null.

| Improve this Doc View Source

LastIndex

Determine the last index that exists in the ILongArray.

Declaration
long LastIndex { get; }
Property Value
Type Description
System.Int64

The highest long value, 0 <= n <= Int64.MaxValue, that exists in this ILongArray, or -1 if the ILongArray is empty.

| Improve this Doc View Source

SyncRoot

Gets an object that can be used to synchronize access to this ILongArray.

Declaration
object SyncRoot { get; }
Property Value
Type Description
System.Object

Object used to synchronize access to this ILongArray.

Methods

| Improve this Doc View Source

Add(Object)

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

Declaration
long Add(object value)
Parameters
Type Name Description
System.Object value

The object to add to the ILongArray.

Returns
Type Description
System.Int64

The long index value at which the element value was stored.

| Improve this Doc View Source

Clear()

Remove all elements from the ILongArray.

Declaration
void Clear()
| Improve this Doc View Source

Contains(Object)

Determine if the ILongArray contains the specified element.

Declaration
bool Contains(object value)
Parameters
Type Name Description
System.Object value

Element whose presence in this list is to be tested.

Returns
Type Description
System.Boolean

true if this list contains the specified element.

Remarks

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

| Improve this Doc View Source

Equals(Object)

Test for ILongArray equality.

Declaration
bool Equals(object o)
Parameters
Type Name Description
System.Object o

An Object to compare to this ILongArray for equality.

Returns
Type Description
System.Boolean

true if the passed Object is an ILongArray containing the same indexes and whose elements at those indexes are equal.

| Improve this Doc View Source

Exists(Int64)

Determine if the specified index is in use.

Declaration
bool Exists(long index)
Parameters
Type Name Description
System.Int64 index

A long index value.

Returns
Type Description
System.Boolean

true if a value (including null) is stored at the specified index, otherwise false.

| Improve this Doc View Source

GetEnumerator()

Obtain an IEnumerator of the contents of the ILongArray.

Declaration
IEnumerator GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator

An instance of IEnumerator.

| Improve this Doc View Source

GetEnumerator(Int64)

Obtain an IEnumerator of the contents of the ILongArray, starting at a particular index such that the first call to MoveNext will set the location of the enumerator at the first existent index that is greater than or equal to the specified index, or will throw an IndexOutOfRangeException if there is no such existent index.

Declaration
IEnumerator GetEnumerator(long index)
Parameters
Type Name Description
System.Int64 index

The ILongArray index to iterate from.

Returns
Type Description
System.Collections.IEnumerator

An instance of IEnumerator.

Exceptions
Type Condition
System.IndexOutOfRangeException

If index greater than or equal to the specified index does not exist.

| Improve this Doc View Source

Remove(Int64)

Remove the specified index from the ILongArray, returning its associated value.

Declaration
object Remove(long index)
Parameters
Type Name Description
System.Int64 index

The index into the ILongArray.

Returns
Type Description
System.Object

The associated value (which can be null) or null if the specified index is not in the ILongArray.

| Improve this Doc View Source

ToString()

Provide a string representation of the ILongArray.

Declaration
string ToString()
Returns
Type Description
System.String

A human-readable string value describing the ILongArray instance.

  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2000, 2020, Oracle and/or its affiliates. All rights reserved.