media/src/main/java/androidx/media/Rating2.java
public static @Nullable Rating2 newPercentageRating(float percent) {
        if ((percent < 0.0f) || (percent > 100.0f)) {
            Log.e(TAG, "Invalid percentage-based rating value");
            return null;
        } else {
            return new Rating2(RATING_PERCENTAGE, percent);
        }
    }
/**
     * Return a Rating2 instance with a percentage-based rating.
     * Create and return a new Rating2 instance with a {@link #RATING_PERCENTAGE}
     * rating style, and a rating of the given percentage.
     *
     * @param percent the value of the rating
     * @return null if the rating is out of range, a new Rating2 instance otherwise.
     */
Return a Rating2 instance with a percentage-based rating.
Create and return a new Rating2 instance with a  #RATING_PERCENTAGE
rating style, and a rating of the given percentage.

@param percent the value of the rating
@return null if the rating is out of range, a new Rating2 instance otherwise.
Return a Rating2 instance with a percentage - based rating . Create and return a new Rating2 instance with a #RATING_PERCENTAGE rating style and a rating of the given percentage . @param percent the value of the rating @return null if the rating is out of range a new Rating2 instance otherwise .
public static @Nullable Rating2 newPercentageRating(float percent) {
        if ((percent < 0.0f) || (percent > 100.0f)) {
            Log.e(TAG, "Invalid percentage-based rating value");
            return null;
        } else {
            return new Rating2(RATING_PERCENTAGE, percent);
        }
    }
public static @ Nullable Rating2 newPercentageRating ( float percent ) { if ( ( percent < 0.0f ) || ( percent > 100.0f ) ) { Log . e ( TAG , "Invalid percentage-based rating value" ) ; return null ; } else { return new Rating2 ( RATING_PERCENTAGE , percent ) ; } }
Return a Rating2 instance with a percentage-based rating.
Return a Rating2 instance with a percentage - based rating .