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

hydra.langs.java.syntax.StringLiteral Maven / Gradle / Ivy

package hydra.langs.java.syntax;

import java.io.Serializable;

/**
 * Note: this is an approximation which ignores encoding
 */
public class StringLiteral implements Serializable {
  public static final hydra.core.Name NAME = new hydra.core.Name("hydra/langs/java/syntax.StringLiteral");
  
  /**
   * Note: this is an approximation which ignores encoding
   */
  public final String value;
  
  public StringLiteral (String value) {
    this.value = value;
  }
  
  @Override
  public boolean equals(Object other) {
    if (!(other instanceof StringLiteral)) {
      return false;
    }
    StringLiteral o = (StringLiteral) (other);
    return value.equals(o.value);
  }
  
  @Override
  public int hashCode() {
    return 2 * value.hashCode();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy