|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.nds.dirxml.driver.xds.util.Java
A library of Java helper methods.
Field Summary | |
static Hashtable |
EMPTY_HASH_TABLE
An empty Hashtable. |
static String |
EMPTY_STRING
Empty string. |
static int |
END_OF_STREAM
The value returnd for end-of-stream. |
static int |
EQUAL
The value returned for equal from compare() methods. |
static int |
INDEX_FIRST
The first index in data structures. |
static int |
INDEX_NOT_FOUND
The value returned for not found from find() methods. |
Constructor Summary | |
Java()
|
Method Summary | |
static StringBuffer |
clear(StringBuffer b)
Clears the contents of a StringBuffer . |
static Object |
getFirst(List l)
Returns the fist Object in a List . |
static boolean |
isJRE(int major,
int minor)
Is the Java Runtime Environment (JRE) >= the passed version information? |
static boolean |
isJRE(int major,
int minor1,
int minor2,
int rev1,
int rev2)
Is the Java Runtime Environment (JRE) >= the passed version information? |
static boolean |
isNullOrEmpty(Collection c)
Determies whether a Collection is null or empty? |
static boolean |
isNullOrEmpty(Map m)
Determines whether a Map is null or empty? |
static boolean |
isNullOrZeroLength(byte[] bytes)
Determines whether a byte[] is null or has a length of zero? |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int EQUAL
public static final int INDEX_FIRST
public static final int INDEX_NOT_FOUND
public static final int END_OF_STREAM
public static final Hashtable EMPTY_HASH_TABLE
public static final String EMPTY_STRING
Constructor Detail |
public Java()
Method Detail |
public static final boolean isJRE(int major, int minor)
major
- the major versionminor
- the minor version
true
or false
public static final boolean isJRE(int major, int minor1, int minor2, int rev1, int rev2)
major
- the major version (e.g., 1)minor1
- the first minor version (e.g., 1.4)minor2
- the second minor version (e.g., 1.4.2)rev1
- the first revision number (e.g., 1.4.2_0)rev2
- the second revision number (e.g., 1.4.2_08)
true
or false
public static final Object getFirst(List l)
Object
in a List
.
l
- the list; may be null
null
public static final boolean isNullOrEmpty(Collection c)
Collection
is null
or empty?
c
- the collection; may be null
true
if it is; false
otherwisepublic static final boolean isNullOrEmpty(Map m)
Map
is null
or empty?
m
- the collection; may be null
true
if it is; false
otherwisepublic static final boolean isNullOrZeroLength(byte[] bytes)
byte[]
is null
or has a length of zero?
bytes
- the array; may be null
true
if it is; false
otherwisepublic static final StringBuffer clear(StringBuffer b)
StringBuffer
.
b
- the b; may be null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |