2525
2626import static com .mta .tehreer .internal .util .Preconditions .checkNotNull ;
2727
28+ /**
29+ * Represents font variation axis.
30+ */
2831public final class VariationAxis {
32+ /**
33+ * The axis should not be exposed directly in user interfaces.
34+ */
2935 public static final int FLAG_HIDDEN_AXIS = 0x0001 ;
3036
37+ /** @hide */
3138 @ IntDef (
3239 flag = true ,
3340 value = {
@@ -43,6 +50,17 @@ public final class VariationAxis {
4350 private final float minValue ;
4451 private final float maxValue ;
4552
53+ /**
54+ * Returns a variation axis object with the specified values.
55+ *
56+ * @param tag Tag identifying the design variation.
57+ * @param name The display name.
58+ * @param flags Axis qualifiers.
59+ * @param defaultValue The default coordinate value.
60+ * @param minValue The minimum coordinate value.
61+ * @param maxValue The maximum coordinate value.
62+ * @return A new variation axis object.
63+ */
4664 public static @ NonNull VariationAxis of (int tag , @ NonNull String name , @ Flags int flags ,
4765 float defaultValue , float minValue , float maxValue ) {
4866 checkNotNull (name , "name" );
@@ -60,26 +78,56 @@ private VariationAxis(int tag, @Nullable String name, @Flags int flags,
6078 this .maxValue = maxValue ;
6179 }
6280
81+ /**
82+ * Returns the tag identifying the design variation.
83+ *
84+ * @return The tag identifying the design variation.
85+ */
6386 public int tag () {
6487 return tag ;
6588 }
6689
90+ /**
91+ * Returns the display name.
92+ *
93+ * @return The display name.
94+ */
6795 public @ NonNull String name () {
6896 return name ;
6997 }
7098
99+ /**
100+ * Returns the axis qualifiers.
101+ *
102+ * @return The axis qualifiers.
103+ */
71104 public @ Flags int flags () {
72105 return flags ;
73106 }
74107
108+ /**
109+ * Returns the default coordinate value.
110+ *
111+ * @return The default coordinate value.
112+ */
75113 public float defaultValue () {
76114 return defaultValue ;
77115 }
78116
117+ /**
118+ * Returns the minimum coordinate value.
119+ *
120+ * @return The minimum coordinate value.
121+ */
79122 public float minValue () {
80123 return minValue ;
81124 }
82125
126+ /**
127+ * Returns the maximum coordinate value.
128+ *
129+ * @return The maximum coordinate value.
130+ */
83131 public float maxValue () {
84132 return maxValue ;
85133 }
0 commit comments