@java.lang.SuppressWarnings("unused") public class ObjectUtilities extends java.lang.Object
These are utilities that should exist elsewhere, but I can't find a good simple library for them, and they are stupid but necessary for certain things.
Modifiers | Name | Description |
---|---|---|
static java.util.Map<java.lang.String, java.lang.Integer> |
calendarFieldByUomId |
|
protected static org.slf4j.Logger |
logger |
|
static java.util.Map<java.lang.String, java.time.temporal.TemporalUnit> |
temporalUnitByUomId |
Type Params | Return Type | Name and description |
---|---|---|
|
public static java.lang.Number |
addNumbers(java.lang.Number a, java.lang.Number b) |
|
public static java.lang.Object |
basicConvert(java.lang.Object value, java.lang.String javaType) |
|
public static boolean |
compare(java.lang.Object field, java.lang.String operator, java.lang.String value, java.lang.Object toField, java.lang.String format, java.lang.String type) |
|
public static boolean |
compareLike(java.lang.Object value1, java.lang.Object value2) |
|
public static int |
compareObj(java.lang.Object field1, java.lang.Object field2) |
|
public static int |
copyStream(java.io.InputStream is, java.io.OutputStream os) |
|
public static int |
countChars(java.lang.String s, boolean countDigits, boolean countLetters, boolean countOthers) |
|
public static int |
countChars(java.lang.String s, char cMatch) |
|
public static int |
getCalendarFieldFromUomId(java.lang.String uomId) |
|
public static java.lang.Class |
getClass(java.lang.String javaType) |
|
public static java.lang.String |
getStreamText(java.io.InputStream is) |
|
public static java.lang.String |
getStreamText(java.io.InputStream is, java.nio.charset.Charset charset) |
|
public static java.time.temporal.TemporalUnit |
getTemporalUnitFromUomId(java.lang.String uomId) |
|
public static boolean |
isEmpty(java.lang.Object obj) Like the Groovy empty except doesn't consider empty 0 value numbers, false Boolean, etc; only null values, 0 length String (actually CharSequence to include GString, etc), and 0 size Collection/Map are considered empty. |
|
public static boolean |
isInstanceOf(java.lang.Object theObjectInQuestion, java.lang.String javaType) |
|
public static java.lang.Comparable |
makeComparable(java.lang.Object obj) |
|
public static java.lang.String |
toPlainString(java.lang.Object obj) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Like the Groovy empty except doesn't consider empty 0 value numbers, false Boolean, etc; only null values, 0 length String (actually CharSequence to include GString, etc), and 0 size Collection/Map are considered empty.