|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.util.Util
public class Util
General Utilities
| Constructor Summary | |
|---|---|
Util()
|
|
| Method Summary | |
|---|---|
static String |
cleanAmp(String in)
Clean Ampersand (used to indicate shortcut) |
static String |
cleanWhitespace(String in)
Clean - Remove all white spaces |
static void |
dump(Map map)
Dump a Map (key=value) to out |
static int |
findIndexOf(String str,
char search)
Find index of search character in str. |
static int |
findIndexOf(String str,
char search1,
char search2)
Find index of search characters in str. |
static int |
findIndexOf(String str,
String search)
Find index of search character in str. |
static int |
getCount(String string,
char countChar)
Get the number of occurances of countChar in string. |
static AttributedCharacterIterator |
getIterator(AttributedString aString,
AttributedCharacterIterator.Attribute[] relevantAttributes)
Return a Iterator with only the relevant attributes. |
static String |
initCap(String in)
Init Cap Words With Spaces |
static boolean |
is8Bit(String str)
Is 8 Bit |
static boolean |
isEmpty(String str)
Is String Empty |
static boolean |
isEmpty(String str,
boolean trimWhitespaces)
Is String Empty |
static void |
main(String[] args)
Test |
static String |
maskHTML(String content)
Mask HTML content. |
static String |
maskHTML(String content,
boolean maskCR)
Mask HTML content. |
static void |
printActionInputMap(JComponent comp)
Print Action and Input Map for component |
static String |
removeCRLF(String in)
Remove CR / LF from String |
static String |
replace(String value,
String oldPart,
String newPart)
Replace String values. |
static int |
size(String str)
Size of String in bytes |
static String |
stripDiacritics(String s)
String diacritics from given string |
static String |
toHex(byte b)
Return Hex String representation of byte b |
static String |
toHex(char c)
Return Hex String representation of char c |
static String |
trimLength(String str,
int length)
Trim to max character length |
static String |
trimSize(String str,
int size)
Trim to max byte size |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Util()
| Method Detail |
|---|
public static String replace(String value,
String oldPart,
String newPart)
value - string to be processedoldPart - old partnewPart - replacement - can be null or ""
public static String removeCRLF(String in)
in - input
public static String cleanWhitespace(String in)
in - in
public static String maskHTML(String content)
content - content
maskHTML(String, boolean)
public static String maskHTML(String content,
boolean maskCR)
content - contentmaskCR - convert CR into content is null
public static int getCount(String string,
char countChar)
string - String to be searchedcountChar - to be counted character
public static boolean isEmpty(String str)
str - string
public static boolean isEmpty(String str,
boolean trimWhitespaces)
str - stringtrimWhitespaces - trim whitespaces
public static int findIndexOf(String str,
char search)
str - stringsearch - search character
public static int findIndexOf(String str,
char search1,
char search2)
str - stringsearch1 - first search charactersearch2 - second search character (or)
public static int findIndexOf(String str,
String search)
str - stringsearch - search character
public static String toHex(byte b)
b - byte
public static String toHex(char c)
c - character
public static String initCap(String in)
in - string
public static AttributedCharacterIterator getIterator(AttributedString aString,
AttributedCharacterIterator.Attribute[] relevantAttributes)
aString - attributed stringrelevantAttributes - relevant attributes
public static void dump(Map map)
map - Mappublic static void printActionInputMap(JComponent comp)
comp - Component with ActionMappublic static boolean is8Bit(String str)
str - string
public static String cleanAmp(String in)
in - input
public static String trimLength(String str,
int length)
str - stringlength - max (incl) character length
public static int size(String str)
str - string
public static String trimSize(String str,
int size)
str - stringsize - max size in bytes
public static void main(String[] args)
args - argspublic static String stripDiacritics(String s)
s - original string
|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||