Class Variable

  • All Implemented Interfaces:
    com.marcnuri.yakc.model.Model

    public class Variable
    extends java.lang.Object
    implements com.marcnuri.yakc.model.Model
    Variable is the definition of a variable that is used for composition.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Variable.Builder  
    • Constructor Summary

      Constructors 
      Constructor Description
      Variable()  
      Variable​(@NonNull java.lang.String expression, @NonNull java.lang.String name)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Variable.Builder builder()  
      protected boolean canEqual​(java.lang.Object other)  
      boolean equals​(java.lang.Object o)  
      @NonNull java.lang.String getExpression()
      Expression is the expression that will be evaluated as the value of the variable.
      @NonNull java.lang.String getName()
      Name is the name of the variable.
      int hashCode()  
      void setExpression​(@NonNull java.lang.String expression)
      Expression is the expression that will be evaluated as the value of the variable.
      void setName​(@NonNull java.lang.String name)
      Name is the name of the variable.
      Variable.Builder toBuilder()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Variable

        public Variable​(@NonNull
                        @NonNull java.lang.String expression,
                        @NonNull
                        @NonNull java.lang.String name)
      • Variable

        public Variable()
    • Method Detail

      • getExpression

        @NonNull
        public @NonNull java.lang.String getExpression()
        Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation.
      • getName

        @NonNull
        public @NonNull java.lang.String getName()
        Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is "foo", the variable will be available as `variables.foo`
      • setExpression

        public void setExpression​(@NonNull
                                  @NonNull java.lang.String expression)
        Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation.
      • setName

        public void setName​(@NonNull
                            @NonNull java.lang.String name)
        Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is "foo", the variable will be available as `variables.foo`
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object