public final class Intrinsics
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Intrinsics.EqualityFunction
Anything that implements value-equality function as replaced by the
Intrinsics.EqualityFunction.equals(java.lang.Object, java.lang.Object) intrinsic. |
static interface |
Intrinsics.KeyHasher<T>
Anything that distributes keys by their hash value.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
add(T op1,
T op2)
An intrinsic that is replaced with plain addition of arguments for
primitive template types.
|
static <T> T |
cast(java.lang.Object value)
A template cast to the given type T.
|
static <T> T |
empty()
Returns the default "empty key" (
null or 0 for
primitive types). |
static <T> boolean |
equals(Intrinsics.EqualityFunction delegate,
java.lang.Object e1,
java.lang.Object e2)
Compare two keys for equivalence.
|
static <T> boolean |
equals(java.lang.Object e1,
java.lang.Object e2)
Compare two keys for equivalence.
|
static <T> boolean |
isEmpty(java.lang.Object value)
Returns
true if the provided value is an "empty key" marker. |
static <T> T[] |
newArray(int arraySize)
Creates an array for the given template type.
|
public static <T> boolean isEmpty(java.lang.Object value)
true if the provided value is an "empty key" marker.
For generic types the empty key is null, for any other type
it is an equivalent of zero.
Testing for zeros should be compiled into fast machine code.public static <T> T empty()
null or 0 for
primitive types).public static <T> T cast(java.lang.Object value)
public static <T> T[] newArray(int arraySize)
public static <T> boolean equals(Intrinsics.EqualityFunction delegate, java.lang.Object e1, java.lang.Object e2)
==, except for
floating-point types where they're compared by their actual representation
bits as returned from Double.doubleToLongBits(double) and
Float.floatToIntBits(float).public static <T> boolean equals(java.lang.Object e1,
java.lang.Object e2)
Object.equals(Object).
Primitive types are compared using ==, except for
floating-point types where they're compared by their actual representation
bits as returned from Double.doubleToLongBits(double) and
Float.floatToIntBits(float).public static <T> T add(T op1,
T op2)
Copyright © 2025 Carrot Search s.c.. All rights reserved.