Package com.stimulsoft.base.elements
Class StiKeyHelper
java.lang.Object
com.stimulsoft.base.elements.StiKeyHelper
This class helps work with keys. Copyright Stimulsoft
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic StringgetOrGeneratedKey(String key) Returns specified key if it is not empty.static StringgetOrGeneratedKey(String key1, String key2) Returns key1 if it is not empty or key2 if it is not empty.static booleanisCorrectKey(String key) Returns true if the specified key is correct.static booleanisEmptyKey(String key) Returns true if the specifeid key is empty.static booleanisEmptyKey(String key1, String key2) Returns true if both specifeid keys is empty.static booleanisEqualKeys(String key1, String key2) Returns true if both keys equals.static booleanReturns true if the specified key is not empty.static StringReturns key1 if it is not empty.
-
Constructor Details
-
StiKeyHelper
public StiKeyHelper()
-
-
Method Details
-
generateKey
-
isKey
Returns true if the specified key is not empty.- Parameters:
key-- Returns:
-
isCorrectKey
Returns true if the specified key is correct.- Parameters:
key-- Returns:
-
isEmptyKey
Returns true if the specifeid key is empty.- Parameters:
key-- Returns:
-
isEmptyKey
Returns true if both specifeid keys is empty.- Parameters:
key1-key2-- Returns:
-
selectKey
Returns key1 if it is not empty. Otherwise returns key2.- Parameters:
key1-key2-- Returns:
-
isEqualKeys
Returns true if both keys equals.- Parameters:
key1-key2-- Returns:
-
getOrGeneratedKey
Returns specified key if it is not empty. Otherwise returns new generated key.- Parameters:
key-- Returns:
-
getOrGeneratedKey
Returns key1 if it is not empty or key2 if it is not empty. Returns new generated key if both key1 and key2 is empty.- Parameters:
key1-key2-- Returns:
-