All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.pics.db.ValueRange

java.lang.Object
   |
   +----w3c.pics.db.ValueRange

public class ValueRange
extends Object
ValueRanges are the building blocks of Filters, representing the filtering element for a Category.

See Also:
Filter, Category

Constructor Index

 o ValueRange(PICSTokenizer)
Contructs a ValueRange from a PICSTokenizer.
 o ValueRange(String)
Constructor for multi-value ValueRanges
 o ValueRange(String, double, double)
Constructor for a single value Rating
 o ValueRange(String, int)
Constructor for ValueRanges used by InequalChoices.

Method Index

 o addAllowValue(double)
Adds a value to the list of those permitted for this ValueRange.
 o addBlockValue(double)
Adds a value to the list of those not premitted for this ValueRange.
 o addRangeValue(RangeValue)
Adds a range of values to this ValueRange.
 o addRangeValue(StringRangeValue)
Adds a range of values to this ValueRange.
 o getAllowValuelist()
Returns the list of allowed values for this ValueRange.
 o getBlockValuelist()
Returns the list of blocked (not allowed) values for this ValueRange.
 o getRangeValuelist()
Returns the list of ranges for this ValueRange.
 o getTempValue()
Returns the contents of the temp value storage as a Double.
 o getTransmit()
Returns the transmit name for this ValueRange.
 o putTempValue(Double)
Puts a value into the temp value storage.
 o setMulti(boolean)
Sets the value of the ismulti flag.
 o toRulzString(String, boolean, boolean, boolean)
Returns a String representation of the ValueRange in PicsRULZ format.
 o toString()
Returns a String representation of the ValueRange object

Constructors

 o ValueRange
 public ValueRange(String categorytransmit,
                   double min,
                   double max)
Constructor for a single value Rating

Parameters:
categorytransmit - The transmit name for the category
min - The minimum value.
max - The maximum value.
 o ValueRange
 public ValueRange(PICSTokenizer PT) throws PICSException, IOException
Contructs a ValueRange from a PICSTokenizer. Used for parsing filter descriptions.

Parameters:
PT - The PICSTokenizer
Throws: PICSException
If there was an error parsing the filter description.
Throws: IOException
If there was an error reading from the filter description file.
 o ValueRange
 public ValueRange(String categorytransmit)
Constructor for multi-value ValueRanges

Parameters:
categorytransmit - A String with the transmit name of the Category.
 o ValueRange
 public ValueRange(String categorytransmit,
                   int buttonnum)
Constructor for ValueRanges used by InequalChoices.

Parameters:
categorytransmit - A String with the transmit name of the Category.
buttonnum - An int with the a number indicating which inequality to use.

Methods

 o addAllowValue
 public void addAllowValue(double value)
Adds a value to the list of those permitted for this ValueRange.

Parameters:
value - The value to be added.
 o addBlockValue
 public void addBlockValue(double value)
Adds a value to the list of those not premitted for this ValueRange.

Parameters:
value - The value to be added.
 o addRangeValue
 public void addRangeValue(RangeValue value)
Adds a range of values to this ValueRange.

Parameters:
value - The range of values, as a RangeValue.
 o addRangeValue
 public void addRangeValue(StringRangeValue value)
Adds a range of values to this ValueRange.

Parameters:
value - The range of values, as a StringRangeValue.
 o toString
 public String toString()
Returns a String representation of the ValueRange object

Returns:
A String.
Overrides:
toString in class Object
 o toRulzString
 public String toRulzString(String catname,
                            boolean abmode,
                            boolean incmode,
                            boolean ipwgmode)
Returns a String representation of the ValueRange in PicsRULZ format.

Parameters:
catname - The PicsRULZ name for this category.
abmode - A boolean indicating if the default action is to accept or block.
incmode - A boolean indicating if the endpoints of ranges are to be included or not.
Returns:
A String containing a valid expression for in PicsRULZ format.
 o getTransmit
 public String getTransmit()
Returns the transmit name for this ValueRange.

Returns:
A String, containing this ValueRange's transmit name.
 o getAllowValuelist
 public Vector getAllowValuelist()
Returns the list of allowed values for this ValueRange.

Returns:
A Vector containing the allowed values.
 o getBlockValuelist
 public Vector getBlockValuelist()
Returns the list of blocked (not allowed) values for this ValueRange.

Returns:
A Vector containing the blocked values.
 o getRangeValuelist
 public Vector getRangeValuelist()
Returns the list of ranges for this ValueRange.

Returns:
A Vector containing the ranges.
 o getTempValue
 public Double getTempValue()
Returns the contents of the temp value storage as a Double.

Returns:
A Double.
 o putTempValue
 public void putTempValue(Double newval)
Puts a value into the temp value storage.

Parameters:
newval - The value to store.
 o setMulti
 public void setMulti(boolean newval)
Sets the value of the ismulti flag.

Parameters:
newval - The new value for the ismulti flag.

All Packages  Class Hierarchy  This Package  Previous  Next  Index