1 package prefuse.visual.expression; 2 3 import prefuse.data.expression.ColumnExpression; 4 import prefuse.data.expression.Expression; 5 import prefuse.data.expression.Function; 6 import prefuse.data.expression.NotPredicate; 7 import prefuse.data.expression.Predicate; 8 import prefuse.visual.VisualItem; 9 10 15 public class ValidatedPredicate extends ColumnExpression 16 implements Predicate, Function 17 { 18 19 public static final Predicate TRUE = new ValidatedPredicate(); 20 21 public static final Predicate FALSE = new NotPredicate(TRUE); 22 23 26 public ValidatedPredicate() { 27 super(VisualItem.VALIDATED); 28 } 29 30 33 public String getName() { 34 return "VALIDATED"; 35 } 36 37 40 public void addParameter(Expression e) { 41 throw new IllegalStateException ("This function takes 0 parameters"); 42 } 43 44 47 public int getParameterCount() { 48 return 0; 49 } 50 51 54 public String toString() { 55 return getName()+"()"; 56 } 57 58 } | Popular Tags |