From: mike Date: Fri, 29 Jun 2007 10:20:41 +0000 (+0000) Subject: Add single-argument addModifier. X-Git-Tag: v1.5~98 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=34b9c641f51613d021e7ad3bee099164abaa0887;p=cql-java-moved-to-github.git Add single-argument addModifier. --- diff --git a/src/org/z3950/zing/cql/ModifierSet.java b/src/org/z3950/zing/cql/ModifierSet.java index 120b4e9..8c5ec16 100644 --- a/src/org/z3950/zing/cql/ModifierSet.java +++ b/src/org/z3950/zing/cql/ModifierSet.java @@ -1,4 +1,4 @@ -// $Id: ModifierSet.java,v 1.11 2007-06-28 00:23:17 mike Exp $ +// $Id: ModifierSet.java,v 1.12 2007-06-29 10:20:41 mike Exp $ package org.z3950.zing.cql; import java.util.Vector; @@ -15,7 +15,7 @@ import java.lang.StringBuffer; * zero or more type comparison value pairs, * where type, comparison and value are all strings. * - * @version $Id: ModifierSet.java,v 1.11 2007-06-28 00:23:17 mike Exp $ + * @version $Id: ModifierSet.java,v 1.12 2007-06-29 10:20:41 mike Exp $ */ public class ModifierSet { String base; @@ -37,16 +37,24 @@ public class ModifierSet { } /** - * Adds a modifier of the specified type, comparison and - * value to a ModifierSet. + * Adds a modifier of the specified type, + * comparison and value to a ModifierSet. */ public void addModifier(String type, String comparison, String value) { - // ### Need to have comparison passed in Modifier modifier = new Modifier(type, comparison, value); modifiers.add(modifier); } /** + * Adds a modifier of the specified type, but with no + * comparison and value, to a ModifierSet. + */ + public void addModifier(String type) { + Modifier modifier = new Modifier(type); + modifiers.add(modifier); + } + + /** * Returns the value of the modifier in the specified ModifierSet * that corresponds to the specified type. */