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

astra.term.Brackets Maven / Gradle / Ivy

package astra.term;

import astra.reasoner.util.LogicVisitor;
import astra.type.Type;

public class Brackets implements Term {
	/**
	 * 
	 */
	private static final long serialVersionUID = -3531850681574434943L;
	private Term term;
	
	public Brackets(Term term) {
		this.term = term;
	}

	public Boolean value() {
		return null;
	}

	@Override
	public Type type() {
		return term.type();
	}
	
	public Term term() {
		return term;
	}

	@Override
	public Object accept(LogicVisitor visitor) {
		return visitor.visit(this);
	}

	@Override
	public boolean matches(Term term) {
		return (term instanceof Variable);
	}

	@Override
	public String signature() {
		return "b";
	}
	
	public String toString() {
		return "(" + term + ")";
	}
	
	public Brackets clone() {
		return new Brackets(term.clone());
	}

	public void reIndex() {
		term.reIndex();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy