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

com.bigcustard.glide.code.SyntaxPart Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
package com.bigcustard.glide.code;


public class SyntaxPart {
	private String text;
	private Type type;

	public SyntaxPart(String text, Type type) {
		this.text = text;
		this.type = type;
	}

    public Type type() {
        return type;
    }

    public String text() {
        return text;
    }

    public void type(Type type) {
        this.type = type;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        SyntaxPart that = (SyntaxPart) o;

        if (!text.equals(that.text)) return false;
        if (type != that.type) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = text.hashCode();
        result = 31 * result + type.hashCode();
        return result;
    }

    @Override
    public String toString() {
        return "SyntaxPart{" +
                "text='" + text + '\'' +
                ", type=" + type +
                '}';
    }

    public enum Type {
		Keyword, Operator, Comment, Quoted, UnclosedQuote, Unclassified
	}
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy