Class Kijkwijzer
- All Implemented Interfaces:
Serializable
,NicamRated
See about kijkwijzer
Combines an AgeRating
with ContentRating
s (which can be seen as the 'reason' for the rating).
There are several ways to code a kijkwijzer in a string.
For the content ratings, this is pretty straight forward. Every rating is assigned a simple ContentRating.toChar()
. A string of those chars represents the content ratings.
Age ratings are represented in different ways, but always as an integer. Prior to 5.12 it was always one digit. See toDonnaCode()
and toCode()
With the arrival of new age ratings AgeRating._14
and AgeRating._18
it was unclear what the new digits would be for those, and we decided to simply introduce a new format where the age rating is always represented with two digits, and where the correspondence is more straightforward (the integer associated with e.g. AgeRating._14
became 14
) (using toPaddedCode(AgeRating)
- Since:
- 4.2
- Author:
- Michiel Meeuwissen
- See Also:
-
Constructor Summary
ConstructorDescriptionKijkwijzer
(@Nullable AgeRating ageRating, @NonNull ContentRating... contentRatings) Kijkwijzer
(@Nullable AgeRating ageRating, Collection<@NonNull ContentRating> contentRatings) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
List<@NonNull ContentRating>
int
hashCode()
static Kijkwijzer
of
(NicamRated nicamRated) static Kijkwijzer
Deprecated.static Kijkwijzer
parseDonna
(String value) Deprecated.static Optional<Kijkwijzer>
parsePaddedCode
(CharSequence value) toCode()
Deprecated.static @Nullable Character
Deprecated.Deprecated.static @Nullable Character
toDonnaCode
(@Nullable AgeRating ageRating) A short string representing this NICAM rating, a 2 digit integertoPaddedCode(AgeRating)
followed by theContentRating.toChar()
s of the content ratings.static String
toPaddedCode
(@Nullable AgeRating ageRating) Returns the age rating as a padded int, always 2 chars.@NonNull String
toString()
withAgeRating
(AgeRating ageRating) withContentRating
(ContentRating... contentRating) withContentRatings
(List<ContentRating> contentRatings) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface nl.vpro.nicam.NicamRated
isNicamRated
-
Constructor Details
-
Kijkwijzer
-
Kijkwijzer
-
Kijkwijzer
public Kijkwijzer()
-
-
Method Details
-
parse
Deprecated. -
parseDonna
Deprecated. -
parsePaddedCode
- Since:
- 5.12
-
toCode
Deprecated. -
toPaddedCode
Returns the age rating as a padded int, always 2 chars.- Returns:
- the agerating as a padded int, or the empty string if the given age rating is
null
-
toDonnaCode
-
of
-
withAgeRating
-
withContentRating
-
withContentRatings
-
toDonnaCode
Deprecated. -
toCode
Deprecated. -
toPaddedCode
A short string representing this NICAM rating, a 2 digit integertoPaddedCode(AgeRating)
followed by theContentRating.toChar()
s of the content ratings.- Since:
- 5.12
-
getAgeRating
- Specified by:
getAgeRating
in interfaceNicamRated
-
getContentRatings
- Specified by:
getContentRatings
in interfaceNicamRated
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-