Judy
class Judy implements ArrayAccess (View source)
Class Judy.
Constants
BITSET |
Define the Judy Array as a Bitset with keys as Integer and Values as a Boolean. |
INT_TO_INT |
Define the Judy Array with key/values as Integer, and Integer only. |
INT_TO_MIXED |
Define the Judy Array with keys as Integer and Values of any type. |
STRING_TO_INT |
Define the Judy Array with keys as a String and Values as Integer, and Integer only. |
STRING_TO_MIXED |
Define the Judy Array with keys as a String and Values of any type. |
Methods
(PECL judy >= 0.1.1)
Construct a new Judy object. A Judy object can be accessed like a PHP Array.
(PECL judy >= 0.1.1)
Destruct a Judy object.
(PECL judy >= 0.1.1)
Locate the Nth index present in the Judy array.
(PECL judy >= 0.1.1)
Count the number of elements in the Judy array.
(PECL judy >= 0.1.1)
Search (inclusive) for the first index present that is equal to or greater than the passed Index.
(PECL judy >= 0.1.1)
Search (inclusive) for the first absent index that is equal to or greater than the passed Index.
(PECL judy >= 0.1.1)
Free the entire Judy array.
(PECL judy >= 0.1.1)
Return an integer corresponding to the Judy type of the current object.
(PECL judy >= 0.1.1)
Search (inclusive) for the last index present that is equal to or less than the passed Index.
(PECL judy >= 0.1.1)
Search (inclusive) for the last absent index that is equal to or less than the passed Index.
(PECL judy >= 0.1.1)
Return the memory used by the Judy array.
(PECL judy >= 0.1.1)
Search (exclusive) for the next index present that is greater than the passed Index.
(PECL judy >= 0.1.1)
Search (exclusive) for the next absent index that is greater than the passed Index.
(PECL judy >= 0.1.1)
Whether or not an offset exists.
(PECL judy >= 0.1.1)
Returns the value at specified offset.
(PECL judy >= 0.1.1)
Assigns a value to the specified offset.
(PECL judy >= 0.1.1)
Unsets an offset.
(PECL judy >= 0.1.1)
Search (exclusive) for the previous index present that is less than the passed Index.
(PECL judy >= 0.1.1)
Search (exclusive) for the previous index absent that is less than the passed Index.
(PECL judy >= 0.1.1)
Count the number of elements in the Judy array.
This method is an alias of const count.
Details
__construct(int $judy_type)
(PECL judy >= 0.1.1)
Construct a new Judy object. A Judy object can be accessed like a PHP Array.
__destruct()
(PECL judy >= 0.1.1)
Destruct a Judy object.
int
byCount(int $nth_index)
(PECL judy >= 0.1.1)
Locate the Nth index present in the Judy array.
int
count(int $index_start = 0, int $index_end = -1)
(PECL judy >= 0.1.1)
Count the number of elements in the Judy array.
mixed
first(mixed $index = 0)
(PECL judy >= 0.1.1)
Search (inclusive) for the first index present that is equal to or greater than the passed Index.
mixed
firstEmpty(mixed $index = 0)
(PECL judy >= 0.1.1)
Search (inclusive) for the first absent index that is equal to or greater than the passed Index.
free()
(PECL judy >= 0.1.1)
Free the entire Judy array.
int
getType()
(PECL judy >= 0.1.1)
Return an integer corresponding to the Judy type of the current object.
mixed
last(int|string $index = -1)
(PECL judy >= 0.1.1)
Search (inclusive) for the last index present that is equal to or less than the passed Index.
mixed
lastEmpty(int|string $index = -1)
(PECL judy >= 0.1.1)
Search (inclusive) for the last absent index that is equal to or less than the passed Index.
int
memoryUsage()
(PECL judy >= 0.1.1)
Return the memory used by the Judy array.
mixed
next(mixed $index)
(PECL judy >= 0.1.1)
Search (exclusive) for the next index present that is greater than the passed Index.
mixed
nextEmpty(int|string $index)
(PECL judy >= 0.1.1)
Search (exclusive) for the next absent index that is greater than the passed Index.
bool
offsetExists(TKey $offset)
(PECL judy >= 0.1.1)
Whether or not an offset exists.
mixed
offsetGet(TKey $offset)
(PECL judy >= 0.1.1)
Returns the value at specified offset.
void
offsetSet(TKey $offset, TValue $value)
(PECL judy >= 0.1.1)
Assigns a value to the specified offset.
void
offsetUnset(TKey $offset)
(PECL judy >= 0.1.1)
Unsets an offset.
mixed
prev(mixed $index)
(PECL judy >= 0.1.1)
Search (exclusive) for the previous index present that is less than the passed Index.
mixed
prevEmpty(mixed $index)
(PECL judy >= 0.1.1)
Search (exclusive) for the previous index absent that is less than the passed Index.
int
size(int $index_start = 0, int $index_end = -1)
(PECL judy >= 0.1.1)
Count the number of elements in the Judy array.
This method is an alias of const count.