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

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

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

import java.util.Objects;

/**
 * Token representing a numeric value.
 */
public class NumberToken extends Token {

  public final Double value;

  public NumberToken(Double value) {
    super(ExprTokenType.NUMBER);
    this.value = value;
  }

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

  @Override
    public String toString() {
      return "NUMBER[" + value + "]";
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy