Enum Class YangBooleanConstantExpr
java.lang.Object
java.lang.Enum<YangBooleanConstantExpr>
org.opendaylight.yangtools.yang.xpath.api.YangBooleanConstantExpr
- All Implemented Interfaces:
Serializable
,Comparable<YangBooleanConstantExpr>
,Constable
,Identifiable<QName>
,Immutable
,YangConstantExpr<Boolean>
,YangExpr
public enum YangBooleanConstantExpr
extends Enum<YangBooleanConstantExpr>
implements YangConstantExpr<Boolean>
Expressions which evaluate to a logical
true
or false
. These expressions are equivalent to the result
returned by true()
and false()
functions defined in XPath 1.0.
They also map these functions' names to the constant pool under their YangFunctionCallExpr.getName()
identity. All users should use these constants in favor of their equivalent function calls.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionConvert this constant into the equivalent function.Convert this constant into a string literal, i.e.static Optional<YangFunctionCallExpr>
forFunctionName
(String functionName) Return this objects Identifier.getValue()
Return this constant's value.static YangBooleanConstantExpr
of
(boolean bool) static YangBooleanConstantExpr
Returns the enum constant of this class with the specified name.static YangBooleanConstantExpr[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FALSE
A constantfalse
expression. -
TRUE
A constanttrue
expression.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getIdentifier
Description copied from interface:Identifiable
Return this objects Identifier.- Specified by:
getIdentifier
in interfaceIdentifiable<QName>
- Returns:
- Object's identifier, must not be null.
-
getValue
Description copied from interface:YangConstantExpr
Return this constant's value.- Specified by:
getValue
in interfaceYangConstantExpr<Boolean>
- Returns:
- this constant's value.
-
asFunction
Convert this constant into the equivalent function. This function is provided for bridging purposes only.- Returns:
- Equivalent function invocation.
-
asStringLiteral
Convert this constant into a string literal, i.e. the result of callingstring(boolean)
function on this constant.- Returns:
- Literal expression.
-
of
-
forFunctionName
-