All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.squarespace.template.expr.BooleanToken Maven / Gradle / Ivy

There is a newer version: 2.10.0
Show newest version
package com.squarespace.template.expr;

/**
 * Token representing a boolean value.
 */
public class BooleanToken extends Token {

  public final Boolean value;

  public BooleanToken(Boolean value) {
    super(ExprTokenType.BOOLEAN);
    this.value = value;
  }

  @Override
  public boolean equals(Object obj) {
    if (obj instanceof BooleanToken) {
      return ((BooleanToken)obj).value.equals(this.value);
    }
    return false;
  }

  @Override
  public String toString() {
    return "BooleanToken[" + (value ? "TRUE" : "FALSE") + "]";
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy