jlibs.core.lang
Class Util

java.lang.Object
  extended by jlibs.core.lang.Util

public class Util
extends Object

Author:
Santhosh Kumar T

Constructor Summary
Util()
           
 
Method Summary
static
<T> T
clone(T obj)
           
static boolean equals(Object obj1, Object obj2)
          Returns true if given two objects are same.
static int hashCode(Object... objects)
          returns hashCode of given arguments.
static int hashCode(Object obj)
          returns hashCode of given argument.
static
<T> T
notNull(T... values)
          Returns first non null element in values.
static long parseLong(String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

notNull

public static <T> T notNull(T... values)
Returns first non null element in values. If all elements are null, it returns null.


equals

public static boolean equals(Object obj1,
                             Object obj2)
Returns true if given two objects are same. null values are handled as follows: null != non-null null == null Arrays are handled using Arrays.equals(...)


hashCode

public static int hashCode(Object obj)
returns hashCode of given argument. if argument is null, returns 0


hashCode

public static int hashCode(Object... objects)
returns hashCode of given arguments. if any argument is null, then it considers its hashCode as zero


clone

public static <T> T clone(T obj)
               throws CloneNotSupportedException
Throws:
CloneNotSupportedException

parseLong

public static long parseLong(String value)


Copyright © 2018. All rights reserved.