A JudyL array is the equivalent of an array of
word-sized values. A value is addressed by an index (key). The array may be
sparse and the index may be any word-sized number. Memory to support the
array is allocated as index/value pairs are inserted, and released as
index/value pairs are deleted.
Construct an empty JudyL array.
Insert an index and value into the array, and return a
reference to value. If index is already present, replace
the old value with value.
Delete index from the array and return the value that was stored
at that index (or nil if none).
Return the value stored at index (or nil if the index is
not present).
The zero-argument form of count returns
the total number of indices present in the array. The two-argument form of
count returns the number of indices
present between index1 and index2, inclusive. Returns
zero if there are no indices present between index1 and
index2.
Return the nth index that is present in the array (where
n=1 returns the first index present), or nil if there are
not at least n indices present in the array.
Free the entire array and return the number of bytes freed.
Return the number of bytes of memory currently used by the array. This is a
very fast routine and may be used after inserting or removing indices with
little performance impact.
Search (inclusive) for the first index present that is equal to or greater
than index. Start with index=0 to find the first index in
the array. Returns nil if no indices greater than or equal to
index are found.
Search (exclusive) for the next index present that is greater than
index. Returns nil if no indices greater than
index are found.
Search (inclusive) for the last index present that is equal to or less than
index. Start with index=-1 to find the last index in the
array. Returns nil if no indices less than or equal to
index are found.
Search (exclusive) for the previous index present that is less than
index. Returns nil if no indices less than index
are found.
Search (inclusive) for the first absent index that is equal to or greater
than index. Start with index=0 to find the first index
absent from the array. Returns nil if no empty indices greater
than or equal to index are found.
Search (exclusive) for the next absent index that is greater than
index. Returns nil if no empty indices greater than
index are found.
Search (inclusive) for the last absent index that is equal to or less than
index. Start with index=-1 to find the last index absent
from the array. Returns nil if no empty indices less than or equal
to index are found.
Search (exclusive) for the previous absent index that is less than
index. Returns nil if no empty indices less than
index are found.
Returns the first non-nil element of the array, or nil if
empty.
Returns the last non-nil element of the array, or nil if
empty.
Calls block once for each element in the array, passing that element as a
parameter.
Calls block once for each element in the array, passing that element's
index as a parameter.
Calls block once for each empty element in the array, passing that
element's index as a parameter.
Removes all elements from the array.
Returns true if array contains no elements.
Returns the number of non-empty elements.
Returns true if the given object is present in the array.
Return true if the array is full, false otherwise.
Converts this JudyL array to a Ruby Array.