class SimpleSegmentPredicate implements PredicateRuleProducer {

	@Override
	public String getPredicateRule() {
		StringBuilder bldr = new StringBuilder();
		bldr.append("( ").append(this.getMissingFieldName()).append(" == false )")
		    .append(" && ( ").append(this.getValueFieldName());
		if (operator.equalsIgnoreCase(GREATER)) {
			bldr.append(" > ").append(getValue()).append(" )");
			return bldr.toString();
		} else if (operator.equalsIgnoreCase(LESSER)) {
			bldr.append(" < ").append(getValue()).append(" )");
			return bldr.toString();
		} else if (operator.equalsIgnoreCase(EQUAL)) {
			bldr.append(" == ").append(getValue()).append(" )");
			return bldr.toString();
		} else if (operator.equalsIgnoreCase(NOT_EQUAL)) {
			bldr.append(" != ").append(getValue()).append(" )");
			return bldr.toString();
		} else if (operator.equalsIgnoreCase(MISSING)) {
			return this.getMissingFieldName()+" == true";
		} else if (operator.equalsIgnoreCase(NOT_MISSING)) {
			return this.getMissingFieldName()+" == false";
		} else if (operator.equalsIgnoreCase(GREATER_EQUAL)) {
			bldr.append(" >= ").append(getValue()).append(" )");
			return bldr.toString();
		} else if (operator.equalsIgnoreCase(LESSER_EQUAL)) {
			bldr.append(" <= ").append(getValue()).append(" )");
			return bldr.toString();
		}
		throw new IllegalStateException("PMML - SimplePredicate: Unknown operator ("+operator+")");
	}

	public  SimpleSegmentPredicate();
	public  SimpleSegmentPredicate(SimplePredicate predicate);

}