jruby/docs BETA
Navigation
org.apache.lucene.internal.hppc 26
C AbstractIterator
C BitMixer
C BufferAllocationException
C CharCursor
C CharHashSet
C CharObjectHashMap
C DoubleCursor
C FloatArrayList
C FloatCursor
C IntArrayList
C IntCursor
C IntDoubleHashMap
C IntFloatHashMap
C IntHashSet
C IntIntHashMap
C IntLongHashMap
C IntObjectHashMap
C LongArrayList
C LongCursor
C LongFloatHashMap
C LongHashSet
C LongIntHashMap
C LongObjectHashMap
C MaxSizedFloatArrayList
C MaxSizedIntArrayList
C ObjectCursor
IntArrayList — members 42+
F EMPTY_ARRAY() int[]
F buffer() int[]
F elementsCount() int
C new()
C new(expected_elements)
C new(list)
C add(e1)
C add(elements, start, length)
C add(elements)
M add_all(list) int
M add_all(iterable) int
C clear()
M clone() IntArrayList
M contains(e1) boolean
M empty?() boolean
C ensure_capacity(expected_elements)
M equals(obj) boolean
M from(elements) IntArrayList
M get(index) int
M hash_code() int
M index_of(e1) int
C insert(index, e1)
M iterator() IntCursor>
M last_index_of(e1) int
M ram_bytes_used() long
C release()
M remove_all(e) int
M remove_at(index) int
M remove_element(e) boolean
M remove_first(e1) int
M remove_last() int
M remove_last(e1) int
C remove_range(from_index, to_index)
C resize(new_size)
M reverse() IntArrayList
M set(index, e1) int
M size() int
M sort() IntArrayList
M stream() IntStream
M to_array() int[]
M to_string() String
C trim_to_size()
from Accountable
F NULL_ACCOUNTABLE Accountable
M child_resources() Accountable>
from Iterable
C for_each(arg0)
M spliterator() Spliterator<T>

org.apache.lucene.internal.hppc.IntArrayList

class implements Iterable<IntCursor> implements Cloneable implements Accountable 42 members

An array-backed list of int.

Mostly forked and trimmed from com.carrotsearch.hppc.IntArrayList

github: https://github.com/carrotsearch/hppc release 0.10.0

Constants

constanttypenote
EMPTY_ARRAY int[] An immutable empty buffer (array).

Fields

fieldtypenote
buffer int[] Internal array for storing the list. The array may be larger than the current size (#size()).
elementsCount int Current number of elements stored in #buffer.

Constructors

new

new ( )
Java: <init>()

New instance with sane defaults.

new

new ( int expected_elements )
Java: <init>(int expectedElements)

New instance with sane defaults.

nametypedescription
expected_elementsintThe expected number of elements guaranteed not to cause buffer expansion (inclusive).

new

new ( IntArrayList list )
Java: <init>(org.apache.lucene.internal.hppc.IntArrayList list)

Creates a new list from the elements of another list in its iteration order.

Class Methods

from

IntArrayList from ( int[] elements )
Java: from(int[] elements)

Create a list from a variable number of arguments or an array of int. The elements are copied from the argument to the internal buffer.

Instance Methods

add

add ( int e1 )
Java: add(int e1)

add

add ( int[] elements, int start, int length )
Java: add(int[] elements, int start, int length)

Add all elements from a range of given array to the list.

add

add ( int[] elements )
Java: add(int[] elements)

Vararg-signature method for adding elements at the end of the list.

This method is handy, but costly if used in tight loops (anonymous array passing)

add_all

int add_all ( IntArrayList list )
Java: addAll(org.apache.lucene.internal.hppc.IntArrayList list)

Adds all elements from another list.

add_all

int add_all ( Iterable<? extends IntCursor> iterable )
Java: addAll(Iterable<? extends org.apache.lucene.internal.hppc.IntCursor> iterable)

Adds all elements from another iterable.

clear

clear ( )
Java: clear()

Sets the number of stored elements to zero. Releases and initializes the internal storage array to default values. To clear the list without cleaning the buffer, simply set the #elementsCount field to zero.

clone

IntArrayList clone ( )
Java: clone()

Clone this object. The returned clone will reuse the same hash function and array resizing strategy.

contains

boolean contains ( int e1 )
Java: contains(int e1)

empty?

boolean empty? ( )
Java: isEmpty() · also: is_empty

ensure_capacity

ensure_capacity ( int expected_elements )
Java: ensureCapacity(int expectedElements)

Ensure this container can hold at least the given number of elements without resizing its buffers.

nametypedescription
expected_elementsintThe total number of elements, inclusive.

equals

boolean equals ( Object obj )
Java: equals(Object obj)

Returns true only if the other object is an instance of the same class and with the same elements.

get

int get ( int index )
Java: get(int index)

hash_code

int hash_code ( )
Java: hashCode()

index_of

int index_of ( int e1 )
Java: indexOf(int e1)

insert

insert ( int index, int e1 )
Java: insert(int index, int e1)

iterator

Iterator<IntCursor> iterator ( )
Java: iterator()

last_index_of

int last_index_of ( int e1 )
Java: lastIndexOf(int e1)

ram_bytes_used

long ram_bytes_used ( )
Java: ramBytesUsed()

release

release ( )
Java: release()

Sets the number of stored elements to zero and releases the internal storage array.

remove_all

int remove_all ( int e )
Java: removeAll(int e)

Removes all occurrences of e from this collection.

nametypedescription
eintElement to be removed from this collection, if present.

Returns: The number of removed elements as a result of this call.

remove_at

int remove_at ( int index )
Java: removeAt(int index)

Removes the element at the specified position in this container and returns it.

remove_element

boolean remove_element ( int e )
Java: removeElement(int e)

Removes the first element that equals e, returning whether an element has been removed.

remove_first

int remove_first ( int e1 )
Java: removeFirst(int e1)

Removes the first element that equals e1, returning its deleted position or -1 if the element was not found.

remove_last

int remove_last ( )
Java: removeLast()

Removes and returns the last element of this list.

remove_last

int remove_last ( int e1 )
Java: removeLast(int e1)

Removes the last element that equals e1, returning its deleted position or -1 if the element was not found.

remove_range

remove_range ( int from_index, int to_index )
Java: removeRange(int fromIndex, int toIndex)

Removes from this list all the elements with indexes between fromIndex, inclusive, and toIndex, exclusive.

resize

resize ( int new_size )
Java: resize(int newSize)

Truncate or expand the list to the new size. If the list is truncated, the buffer will not be reallocated (use #trimToSize() if you need a truncated buffer), but the truncated values will be reset to the default value (zero). If the list is expanded, the elements beyond the current size are initialized with JVM-defaults (zero or null values).

reverse

IntArrayList reverse ( )
Java: reverse()

Reverses the elements in this list and returns this list.

set

int set ( int index, int e1 )
Java: set(int index, int e1)

size

int size ( )
Java: size()

sort

IntArrayList sort ( )
Java: sort()

Sorts the elements in this list and returns this list.

stream

IntStream stream ( )
Java: stream()

Returns a stream of all the elements contained in this list.

to_array

int[] to_array ( )
Java: toArray()

The returned array is sized to match exactly the number of elements of the stack.

to_string

String to_string ( )
Java: toString()

Convert the contents of this list to a human-friendly string.

trim_to_size

trim_to_size ( )
Java: trimToSize()

Trim the internal buffer to the current size.

Inherited

from Accountable

fieldtypenote
NULL_ACCOUNTABLE Accountable An accountable that always returns 0

child_resources

Collection<Accountable> child_resources ( )
Java: getChildResources() · also: get_child_resources

Returns nested resources of this class. The result should be a point-in-time snapshot (to avoid race conditions).

from Iterable

for_each

for_each ( Consumer<? super T> arg0 )
Java: forEach(java.util.function.Consumer<? super T> arg0)

spliterator

Spliterator<T> spliterator ( )
Java: spliterator()
this work for additional information regarding copyright ownership.