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

fr.lirmm.graphik.integraal.core.DefaultEffectiveQuery Maven / Gradle / Ivy

The newest version!
package fr.lirmm.graphik.integraal.core;

import fr.lirmm.graphik.integraal.api.core.EffectiveQuery;
import fr.lirmm.graphik.integraal.api.core.Query;
import fr.lirmm.graphik.integraal.api.core.Substitution;
import fr.lirmm.graphik.util.string.AppendableToStringBuilder;

public class DefaultEffectiveQuery implements EffectiveQuery, AppendableToStringBuilder {
	Q query;
	S substitution;

	public DefaultEffectiveQuery(Q q, S s) {
		query = q;
		substitution = s;
	}

	@Override
	public S getSubstitution() {
		return substitution;
	}

	@Override
	public Q getQuery() {
		return query;
	}

	// /////////////////////////////////////////////////////////////////////////
	// OBJECT METHODS
	// /////////////////////////////////////////////////////////////////////////

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		this.appendTo(sb);
		return sb.toString();
	}

	@Override
	public void appendTo(StringBuilder sb) {
		sb.append(getClass().getSimpleName() + ": ");
		sb.append(getQuery());
		sb.append(getSubstitution());
		sb.append("\n");
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy