public interface IStringUtil
Define common String operations
- 導入されたバージョン:
- 1.0.0
- バージョン:
- 1.0.0
- 作成者:
- yui-KITAMURA
-
メソッドの概要
修飾子とタイプメソッド説明concat(CharSequence... arg) concat(Iterable<? extends CharSequence> arg) get joined stringconcatWithDelimiter(CharSequence delimiter, CharSequence... arg) concatWithDelimiter(CharSequence delimiter, Iterable<? extends CharSequence> arg) get joined string that each separated with delimiterbooleantest the two objects String value are equal.booleantest the two strings are equal.booleantest the two objects String value are equal in Case-sensitive.booleantest the two strings are equal in Case-sensitive.booleanCheck the objects string representation is empty.booleanCheck the value is empty.nullToEmpty(String value) if the value is null then return""(Empty string)
-
メソッドの詳細
-
eq
@Contract("null,null -> true; null,!null -> false; !null,null -> false; _,_ -> _") boolean eq(String first, String second) test the two strings are equal.null-safe -
eqCase
@Contract("null,null -> true; null,!null -> false; !null,null -> false; _,_ -> _") boolean eqCase(String first, String second) test the two strings are equal in Case-sensitive.null-safe- 関連項目:
-
eq
@Contract("null,null -> true; null,!null -> false; !null,null -> false; _,_ -> _") boolean eq(Object first, Object second) test the two objects String value are equal.- パラメータ:
first- first object to be string valuesecond- second object to be string value- 戻り値:
- if two string value are same then
true - 関連項目:
-
eqCase
@Contract("null,null -> true; null,!null -> false; !null,null -> false; _,_ -> _") boolean eqCase(Object first, Object second) test the two objects String value are equal in Case-sensitive.- パラメータ:
first- first object to be string valuesecond- second object to be string value- 戻り値:
- if two string value are same then
true - 関連項目:
-
concat
get joined string- パラメータ:
arg- any list or arrays to concat- 戻り値:
- single string value that joined all arguments
-
concat
- 関連項目:
-
concatWithDelimiter
@Contract("_,_ -> new") String concatWithDelimiter(CharSequence delimiter, Iterable<? extends CharSequence> arg) get joined string that each separated with delimiter- パラメータ:
delimiter- joint string. ifnullthen one-spacearg- any list or arrays to concat- 戻り値:
- single string value that joined all arguments each separated with delimiter
-
concatWithDelimiter
-
isEmpty
Check the value is empty.- パラメータ:
value- the value that you want to test- 戻り値:
- if
nullor length is 0 thentrue, otherwisefalse
-
isEmpty
Check the objects string representation is empty.- パラメータ:
obj- the object that you want to test- 戻り値:
truewhen null or theObject.toString()value is empty- 関連項目:
-
StringUtils.isEmpty(String)
-
nullToEmpty
if the value is null then return""(Empty string)- パラメータ:
value- the String object or null value- 戻り値:
- if the value is
nullthen empty string(""). Other case, same as original value
-