TrueUpdate Utilities 0.4

net.java.trueupdate.util
Class Objects

java.lang.Object
  extended by net.java.trueupdate.util.Objects

@Immutable
public final class Objects
extends Object

Duplicates some features of java.util.Objects in JSE 7. May be removed when migrating to JSE 7 one day.

Author:
Christian Schlichtherle (copied from TrueLicense Core 2.3.1)

Method Summary
static boolean equals(Object a, Object b)
           
static int hashCode(Object o)
           
static
<T> T
nonDefaultOrNull(T obj, T def)
           
static
<T> T
nonNullOr(T obj, T def)
           
static
<T> T
requireNonNull(T obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

equals

public static boolean equals(@CheckForNull
                             Object a,
                             @CheckForNull
                             Object b)

hashCode

public static int hashCode(@CheckForNull
                           Object o)

nonDefaultOrNull

@Nullable
public static <T> T nonDefaultOrNull(T obj,
                                              @CheckForNull
                                              T def)

nonNullOr

public static <T> T nonNullOr(@CheckForNull
                              T obj,
                              T def)

requireNonNull

public static <T> T requireNonNull(@CheckForNull
                                   T obj)

TrueUpdate Utilities 0.4

Copyright © 2013 Schlichtherle IT Services. All rights reserved.