Class Rating (2.0.0)

public final class Rating implements Serializable, Comparable<Rating>

A user-provided integer rating for a piece of content. Normalized to a 0-100 scale.

Inheritance

java.lang.Object > Rating

Static Fields

MAX_VALUE

public static final int MAX_VALUE

The maximum legal value for a rating.

Field Value
Type Description
int

MIN_VALUE

public static final int MIN_VALUE

The minimum legal value for a rating.

Field Value
Type Description
int

serialVersionUID

public static final long serialVersionUID
Field Value
Type Description
long

Constructors

Rating(int rating)

public Rating(int rating)
Parameter
Name Description
rating int

Methods

compareTo(Rating o)

public int compareTo(Rating o)
Parameter
Name Description
o Rating
Returns
Type Description
int

equals(@Nullable Object o)

public boolean equals(@Nullable Object o)
Parameter
Name Description
o @org.checkerframework.checker.nullness.qual.Nullable java.lang.Object
Returns
Type Description
boolean
Overrides

getRating()

public int getRating()
Returns
Type Description
int

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides