com.scooterframework.web.util
Class M

java.lang.Object
  extended by com.scooterframework.web.util.M

public class M
extends java.lang.Object

M (MiscHelper) class has helper methods for all other situations.


Constructor Summary
M()
           
 
Method Summary
static boolean exist(java.lang.Object data)
          Finds if the data is not null or not.
static boolean isArray(java.lang.Object o)
           
static boolean isEmpty(java.lang.Object data)
          Finds if the data has any value other than null, including an empty string.
static boolean isEmpty(java.lang.String data)
          Finds if the string has any value other than null, or an empty string.
static boolean isEqual(java.lang.String str1, java.lang.String str2)
          Checks if the two strings are equal.
static boolean isset(double value)
          Finds if the data has any value other than 0D.
static boolean isset(double value, double deflt)
          Finds if the data has any value other than the default.
static boolean isset(float value)
          Finds if the data has any value other than 0F.
static boolean isset(float value, float deflt)
          Finds if the data has any value other than the default.
static boolean isset(int value)
          Finds if the data has any value other than 0.
static boolean isset(int value, int deflt)
          Finds if the data has any value other than the default.
static boolean isset(long value)
          Finds if the data has any value other than 0L.
static boolean isset(long value, long deflt)
          Finds if the data has any value other than the default.
static boolean isset(java.lang.Object data)
          Finds if the data has any value other than null, including an empty string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

M

public M()
Method Detail

isEmpty

public static boolean isEmpty(java.lang.String data)
Finds if the string has any value other than null, or an empty string.

Parameters:
data - String
Returns:
true for if the string is null or empty.

isEmpty

public static boolean isEmpty(java.lang.Object data)
Finds if the data has any value other than null, including an empty string.

Parameters:
data - Object
Returns:
true for if the data is null or empty.

exist

public static boolean exist(java.lang.Object data)
Finds if the data is not null or not.

Parameters:
data - a data object
Returns:
true for not null.

isEqual

public static boolean isEqual(java.lang.String str1,
                              java.lang.String str2)
Checks if the two strings are equal.

Parameters:
str1 -
str2 -
Returns:
true if they are equal.

isset

public static boolean isset(java.lang.Object data)
Finds if the data has any value other than null, including an empty string.

Parameters:
data - Object
Returns:
true for having value, false for not having a value.

isset

public static boolean isset(int value)
Finds if the data has any value other than 0.

Parameters:
value - int
Returns:
true if the value is not 0.

isset

public static boolean isset(int value,
                            int deflt)
Finds if the data has any value other than the default.

Parameters:
value - int
Returns:
true if the value is not the same as default.

isset

public static boolean isset(float value)
Finds if the data has any value other than 0F.

Parameters:
value - float
Returns:
true if the value is not 0F.

isset

public static boolean isset(float value,
                            float deflt)
Finds if the data has any value other than the default.

Parameters:
value - float
Returns:
true if the value is not the same as default.

isset

public static boolean isset(double value)
Finds if the data has any value other than 0D.

Parameters:
value - double
Returns:
true if the value is not 0D.

isset

public static boolean isset(double value,
                            double deflt)
Finds if the data has any value other than the default.

Parameters:
value - double
Returns:
true if the value is not the same as default.

isset

public static boolean isset(long value)
Finds if the data has any value other than 0L.

Parameters:
value - long
Returns:
true if the value is not 0L.

isset

public static boolean isset(long value,
                            long deflt)
Finds if the data has any value other than the default.

Parameters:
value - long
Returns:
true if the value is not the same as default.

isArray

public static boolean isArray(java.lang.Object o)