public class JavaUtils extends Object
All members of this class are declared public, most are static, too.
| Modifier and Type | Field and Description |
|---|---|
static String |
LINE_SEPARATOR
Provides the linefeed appropriate for the system.
|
| Constructor and Description |
|---|
JavaUtils()
Constructor method for i18n purposes only.
|
| Modifier and Type | Method and Description |
|---|---|
static Object |
addToArray(Object array,
Object newval)
Adds another element to the given array (saves
System.arraycopy() calls). |
static boolean |
elementOf(Object object,
Object array)
Checks if the given object is element of the given array (equals).
|
static Class |
mapToPrimitive(Class clazz)
Provides the associated primitive type (
Integer ... |
public static final String LINE_SEPARATOR
public JavaUtils()
throws InstantiationException
InstantiationException - Error indicationpublic static Object addToArray(Object array, Object newval)
System.arraycopy() calls).array - Target array of arbitrary typenewval - Element to add, may be nullIllegalArgumentException - Parameters are invalidpublic static boolean elementOf(Object object, Object array)
object - The object to be checkedarray - The array to check againstNullPointerException - If object and/or array is nullpublic static Class mapToPrimitive(Class clazz)
Integer ... int).
The types boolean, byte, char, short, int, long, float, double, and void are supported.
clazz - Class to be mappedclazz if not available
Copyright © 2005-2026 Leisenfels GmbH. All rights reserved.