|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.javimmutable.collections.Holders<V>
V
- public abstract class Holders<V>
Provides static utility methods for constructing Holder instances.
Method Summary | ||
---|---|---|
static
|
areEqual(Holder<T> a,
Holder<T> b)
|
|
boolean |
equals(Object o)
|
|
static
|
fromNullable(V value)
Creates an empty Holder if value is null or a filled Holder if value is non-null. |
|
int |
hashCode()
|
|
static
|
hashCode(Holder<T> a)
|
|
static
|
of()
Creates an empty Holder for the specified type. |
|
static
|
of(V value)
Creates a filled Holder for the specified type and (possibly null) value. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.javimmutable.collections.Holder |
---|
getValue, getValueOr, getValueOrNull, isEmpty, isFilled |
Method Detail |
---|
@Nonnull public static <V> Holders<V> of()
V
-
@Nonnull public static <V> Holders<V> of(@Nullable V value)
V
- value
-
@Nonnull public static <V> Holders<V> fromNullable(@Nullable V value)
V
- value
-
public int hashCode()
hashCode
in class Object
public boolean equals(Object o)
equals
in class Object
public static <T> boolean areEqual(Holder<T> a, Holder<T> b)
public static <T> int hashCode(Holder<T> a)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |