All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.pics.parser.Rating

java.lang.Object
   |
   +----w3c.pics.parser.Rating

public class Rating
extends Object
implements Serializable
A class representing a single PICS rating for use as part of a label. A Rating can either be a single value or a range of values.


Constructor Index

 o Rating(double)
Creates a new single-value Rating.
 o Rating(double, double)
Creates a new range-valued Rating.

Method Index

 o isRange()
Returns a boolean indicating if this Rating is a range or not.
 o toCommaDelimString()
Writes the rating out separated by a comma, if necessary.
 o toDsigString()
Writes the rating in DSig1.0 label format.
 o toString()
Writes the rating out in PICS format.

Constructors

 o Rating
 public Rating(double a)
Creates a new single-value Rating.

Parameters:
a - The value for the Rating.
 o Rating
 public Rating(double a,
               double b)
Creates a new range-valued Rating.

Parameters:
a - The minimum value of the range.
b - The maximum value of the range.

Methods

 o toString
 public String toString()
Writes the rating out in PICS format.

Returns:
A String of the rating in the PICS format.
Overrides:
toString in class Object
 o toDsigString
 public String toDsigString()
Writes the rating in DSig1.0 label format.

Returns:
A String of the rating in DSig1.0 label format.
 o isRange
 public boolean isRange()
Returns a boolean indicating if this Rating is a range or not.

Returns:
A boolean, true if this Rating is a range, false if this rating is a single value.
 o toCommaDelimString
 public String toCommaDelimString()
Writes the rating out separated by a comma, if necessary.

Returns:
e.g. "a, b" or "a"

All Packages  Class Hierarchy  This Package  Previous  Next  Index