Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

oracle.apps.fnd.applcore.oaext.model
Class KeyCombinationUtil

java.lang.Object
  extended by oracle.apps.fnd.applcore.oaext.model.KeyCombinationUtil

public final class KeyCombinationUtil
extends java.lang.Object


Method Summary
static java.lang.String concatenate(java.lang.Object[] keys, char delimiter)
          Concatenates keys together into a key-combination string.
static java.lang.String escape(java.lang.Object o, char delimiter)
          Escapes all occurrences of the delimiter character and the escape character.
static char getEscapeCharacter()
          Gets the escape character used to escape delimiter character.
static java.lang.String[] tokenize(java.lang.String combination, char delimiter)
          Tokenizes a key combination.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getEscapeCharacter

public static char getEscapeCharacter()
Gets the escape character used to escape delimiter character.

Returns:
the escape character

tokenize

public static java.lang.String[] tokenize(java.lang.String combination,
                                          char delimiter)
Tokenizes a key combination.

Parameters:
combination - the key combination
delimiter - the delimiter used to separate the keys
Returns:
the list of keys in this combination in order; an empty array if the given combination is null
Throws:
java.lang.IllegalArgumentException - if the given delmiter is the escape character

concatenate

public static java.lang.String concatenate(java.lang.Object[] keys,
                                           char delimiter)
Concatenates keys together into a key-combination string. If a given key is null, "" is treated as the key.

Parameters:
keys - the keys to be concatenated, toString() is called on each key to convert the object to a string
delimiter - the delimiter used to separate the keys
Returns:
the concatenated key-combination; "" if the given array is null or empty
Throws:
java.lang.IllegalArgumentException - if the given delimiter is the escape character

escape

public static java.lang.String escape(java.lang.Object o,
                                      char delimiter)
Escapes all occurrences of the delimiter character and the escape character. For example, "a\.b" would become "a\\\.b".

Parameters:
o - the string to be processed; if the given object is not a string, toString() is called to convert the object to a string
delimiter - the dlimiter
Returns:
a string where all occurrences of the delimiter character and the escape character are escaped; "" if the given string is null

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

Copyright © 2012 Oracle. All Rights Reserved.