Package eu.bandm.tools.ops
Class Null
java.lang.Object
eu.bandm.tools.ops.Null
An abstract class that has no instances, and only the
null
reference.-
Method Summary
Modifier and TypeMethodDescriptionstatic <A> A
check
(A x) Deprecated.static <A> A
Deprecated.UseObjects.requireNonNull(Object, String)
instead.static <A> A
Deprecated.UseObjects.requireNonNull(Object, String)
instead.static <A> boolean
equals
(A x, A y) Deprecated.UseObjects.equals(java.lang.Object, java.lang.Object)
instead.static int
Deprecated.UseObjects.hashCode(java.lang.Object)
instead.static <A,
B> Function<A, B> Deprecated.static <A,
B extends A, C extends A>
AorElse
(B first, C second) Deprecated.
-
Method Details
-
equals
public static <A> boolean equals(A x, A y) Deprecated.UseObjects.equals(java.lang.Object, java.lang.Object)
instead. -
hashCode
Deprecated.UseObjects.hashCode(java.lang.Object)
instead. -
check
public static <A> A check(A x) Deprecated.UseObjects.requireNonNull(Object)
instead. -
check
Deprecated.UseObjects.requireNonNull(Object, String)
instead. -
check
Deprecated.UseObjects.requireNonNull(Object, String)
instead. -
lift
Deprecated.Returns a variant of the given function that handlesnull
arguments.- Parameters:
fun
- a function- Returns:
- a function that computes the same results as
fun
, but returnsnull
immediately when applied tonull
. - Throws:
NullPointerException
- iffun == null
.
-
orElse
Deprecated.Returns the second value iff the first is null.
-
Objects.requireNonNull(Object)
instead.