A JudySL array is the equivalent of a sorted set
of strings, each associated with a value. A value is addressed by a string
index (or key).
Construct an empty JudySL array.
Insert a string key and value into the array. If
key is already present, replace the old value with value.
Delete key from the array and return the value previously stored
for that key (or nil if this key is not present).
Return the value stored for key (or nil.if the key is not
present.
Free the entire array and return the number of bytes freed.
Search (inclusive) for the first key present that is equal to or greater
than key. Start with key="" to find the first
key in the array. Return nil if no keys greater than or equal to
key are found.
Search (exclusive) for the next key present that is greater than
key. Return nil if no keys greater than key are
found.
Search (inclusive) for the last key present that is equal to or less than
key. There is also a zero-argument form of last_key which returns the last key in the
array. Return nil if no keys less than or equal to key
are found.
Search (exclusive) for the previous key present that is less than
key. Return nil if no keys less than key are
found.
Return true if the given key is present, otherwise
false.
Call block once for each key present, passing the key and value as
parameters. Returns a reference to the array.
Call block once for each key present, passing the key as parameter. Returns
a reference to the array.
Call block once for each key, passing the value as parameter. Returns a
reference to the array.
Remove all key-value pairs from the array and return a reference to the
array.
Return true if array contains no keys, otherwise false.
Returns a new array populated with the keys from this JudySL array. See also values.
Returns a new array populated with the values from this JudySL array. See also keys.
Return the number of key-value pairs in the array.
Converts this JudySL array to a nested Ruby Array
of [key, value] arrays.
Converts this JudySL array to a String by
converting it to an Array of [key, value] pairs and then
converting that array to a string using Array#join with the default
separator.