ラーニング・コモンズ・lang3ツール(II)

三、BooleanUtils
ブールツール

そして、(ブール...配列)ロジックと

BooleanUtils.and(真の)= 
BooleanUtils.and()= 
(BooleanUtils.and 偽の)= 
(BooleanUtils.andを)= 
BooleanUtils.and()= 

比較(ブール値xは、ブールY)は、2つのint型を比較し、xは== yは0 ,! X && yのリターンを返した場合、ブール値を返すこと0未満である、X &&!yは0より大きい戻ります

isFalse(ブールブール値)は偽であり、ブール値を返すかどうか

isTrue(ブールブール値)それが真実であるとブール値を返すかどうか

(ブールブール値)論理否定を否定

BooleanUtils.negate(にBoolean.TRUE)= Boolean.FALSE。
BooleanUtils.negate(Boolean.FALSE) = にBoolean.TRUE。
BooleanUtils.negate(NULL)= NULL ;

または(ブール...配列)または論理

BooleanUtils.or()= 
BooleanUtils.or()= 
BooleanUtils.or()= 
BooleanUtils.or()= 
BooleanUtils.or(真の真の)= 
BooleanUtils.or()= 

返された基本的なオブジェクトタイプ及びデータタイプを変換toBoolean(ブール値ブール値)

BooleanUtils.toBoolean(にBoolean.TRUEは)= 
BooleanUtils.toBoolean(Boolean.FALSE) = 
BooleanUtils.toBoolean(ヌル)= 

toBoolean(int値)がint型に変換され、ブール型を返すであろう

BooleanUtils.toBoolean(0)= 
BooleanUtils.toBooleanは、( 1)= 
BooleanUtils.toBooleanは、( 2)= 

文字列型に変換するtoBoolean(文字列str)とブール型を返します

BooleanUtils.toBoolean(ヌル)= 
BooleanUtils.toBoolean( "真")= 
BooleanUtils.toBoolean( "TRUE")を= 
BooleanUtils.toBoolean( "真の")= 
BooleanUtils.toBoolean( "上を")= 
BooleanUtilsを。 toBoolean( "YES")= 
BooleanUtils.toBoolean( "偽")を= 
BooleanUtils.toBoolean( "X GTIが")= 
BooleanUtils.toBooleanObject( "Y")は= 
BooleanUtils.toBooleanObject( "N")は= 
BooleanUtilsを。toBooleanObject( "T")=
BooleanUtils.toBooleanObject( "F")は= 

toInteger(ブール値ブール値)ブールデータ型がINTと戻り型に変換しました

BooleanUtils.toInteger(真の)1 = 
BooleanUtils.toInteger()= 0

toStringOnOff(ブール値ブール値)ブール型のデータが「オン」の文字列を変換または「オフ」とリターン

BooleanUtils.toStringOnOff(真の "オン")= 
BooleanUtils.toStringOnOff()= "オフ"

toStringTrueFalse(ブールブール値)ブール型のデータは、「」true「または」false「とリターンの文字列を変換し、

BooleanUtils.toStringTrueFalse()= "true"を
BooleanUtils.toStringTrueFalse()= "false"に

toStringYesNo(ブールブール値)ブール型のデータを文字列に変換「yes」または「no」とリターン

BooleanUtils.toStringYesNo()= "yes"を
BooleanUtils.toStringYesNo()= "なし"

XOR(ブール...配列)异或

BooleanUtils.xor(真は)= 
BooleanUtils.xorを()= 
(BooleanUtils.xorを)= 


四、ClassPathUtils
クラスパスツール

toFullyQualifiedName(クラス<?>コンテキスト、文字列resourceNameを)+ resourceNameのスプライシングされたクラスのパッケージ名から文字列を返します。

ClassPathUtils.toFullyQualifiedName(のStringUtils。クラス、 "StringUtils.properties")= "org.apache.commons.lang3.StringUtils.properties"

toFullyQualifiedName(パッケージのコンテキスト、文字列resourceNameを)+ resourceNameのスプライシングされたクラスのパッケージ名から文字列を返します。

ClassPathUtils.toFullyQualifiedName(のStringUtils。クラス .getPackage()、 "StringUtils.properties")= "org.apache.commons.lang3.StringUtils.properties"

toFullyQualifiedPath(クラス<?>コンテキスト、文字列resourceNameを)+ resourceNameのスプライシングされたクラスのパッケージ名から文字列を返します。

ClassPathUtils.toFullyQualifiedPath(のStringUtils。クラス、 "StringUtils.properties")= "ORG / apacheの/コモン/ lang3 / StringUtils.properties"

toFullyQualifiedPath(パッケージのコンテキスト、文字列resourceNameを)+ resourceNameのスプライシングされたクラスのパッケージ名から文字列を返します。

ClassPathUtils.toFullyQualifiedPath(のStringUtils。クラス、 "StringUtils.properties")= "ORG / apacheの/コモン/ lang3 / StringUtils.properties"

 


五、EnumUtilsの
列挙ツール

クラスを通してgetEnum(クラス<E> enumClass、文字列enumName)が列挙を返し、空で返すことができます

クラスの列挙を返すことによってgetEnumList(クラス<E> enumClass)

列挙クラスによってgetEnumMap(クラス<E> enumClass)は、マップを返します。

isValidEnum(クラス<E> enumClass、文字列enumName)enumName列挙では、真偽を返すかどうかを検証します

おすすめ

転載: www.cnblogs.com/deityjian/p/11448277.html