1 package com.ljs.ootp.extract.html.ootp6.rating;
2
3 import com.ljs.ootp.extract.html.rating.IntegerScale;
4 import com.ljs.ootp.extract.html.rating.Rating;
5
6
7
8
9
10 public final class OneToTen extends IntegerScale {
11
12 private static final OneToTen INSTANCE = new OneToTen();
13
14 private OneToTen() {
15 super();
16 }
17
18 @Override
19 protected Integer scale(Integer value) {
20 return value * 10 - 5;
21 }
22
23 public static OneToTen scale() {
24 return INSTANCE;
25 }
26
27 public static Rating<Integer, OneToTen> valueOf(Integer value) {
28 return Rating.create(value, INSTANCE);
29 }
30
31 }