|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.3.0) E17493-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.javatools.util.StringUtil
public final class StringUtil
String utilities.
Field Summary | |
---|---|
static int |
FILEPATH_MAX_DISPLAY_LENGTH |
Method Summary | |
---|---|
static java.lang.String |
addMnemonicToLabelIfNotPresentAlready(java.lang.String label, java.lang.Integer mnemonic) Adds the character represented by the given mnemonic to the given label, only if the label does not already contain such character. |
static java.lang.String |
assembleTokens(java.lang.String[] tokens, java.lang.String delimiters) Assemble the given tokens into a single string delimited by the given delimiters. |
static java.lang.String[] |
getTokenArray(java.lang.String string, java.lang.String delimiters) |
static java.lang.String |
removeMnemonic(java.lang.String text, char mnemonic) Removes the given mnemonic if present in the given text in between parenthesis. |
static java.lang.String |
stripMnemonic(java.lang.String string) |
static java.lang.String |
textWithoutMnemonic(javax.swing.Action action) Returns the text of the given action, removing any mnemonic attached to the end of such text, if present in the given text in between parenthesis. |
static java.lang.String |
truncateFileNameForMessage(java.lang.String path) Truncate a file path for a message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int FILEPATH_MAX_DISPLAY_LENGTH
Method Detail |
---|
public static java.lang.String truncateFileNameForMessage(java.lang.String path)
path
- a file pathpublic static java.lang.String[] getTokenArray(java.lang.String string, java.lang.String delimiters)
public static java.lang.String assembleTokens(java.lang.String[] tokens, java.lang.String delimiters)
tokens
- the tokens to be assembled (must not be null
or empty)delimiters
- the delimiters used to separate the tokens (must not be null
or empty)java.lang.IllegalArgumentException
- if either the tokens or delimiters is null
or emptypublic static java.lang.String stripMnemonic(java.lang.String string)
public static java.lang.String textWithoutMnemonic(javax.swing.Action action)
For example, if text of the action is "Hello(H)", this method will return "Hello".
action
- the given action.public static java.lang.String removeMnemonic(java.lang.String text, char mnemonic)
text
- the text that may contain the mnemonic.mnemonic
- the mnemonic to remove.public static java.lang.String addMnemonicToLabelIfNotPresentAlready(java.lang.String label, java.lang.Integer mnemonic)
For example, if the label is "ABC" and the mnemonic is "D", the result of this method will be "ABC(D)".
label
- the label.mnemonic
- the mnemonic value. If null, the label is returned unmodified.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.3.0) E17493-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |