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.

  • Enum Constant Details

  • Method Details

    • values

      public static YangBooleanConstantExpr[] 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

      public static YangBooleanConstantExpr valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getIdentifier

      public QName getIdentifier()
      Description copied from interface: Identifiable
      Return this objects Identifier.
      Specified by:
      getIdentifier in interface Identifiable<QName>
      Returns:
      Object's identifier, must not be null.
    • getValue

      public Boolean getValue()
      Description copied from interface: YangConstantExpr
      Return this constant's value.
      Specified by:
      getValue in interface YangConstantExpr<Boolean>
      Returns:
      this constant's value.
    • asFunction

      public YangFunctionCallExpr asFunction()
      Convert this constant into the equivalent function. This function is provided for bridging purposes only.
      Returns:
      Equivalent function invocation.
    • asStringLiteral

      public YangLiteralExpr asStringLiteral()
      Convert this constant into a string literal, i.e. the result of calling string(boolean) function on this constant.
      Returns:
      Literal expression.
    • of

      public static YangBooleanConstantExpr of(boolean bool)
    • forFunctionName

      public static Optional<YangFunctionCallExpr> forFunctionName(String functionName)