Skip to content

Commit a913515

Browse files
committed
Fix checkstyle
1 parent 6c7fc68 commit a913515

File tree

5 files changed

+64
-55
lines changed

5 files changed

+64
-55
lines changed

chartjs-java-model/src/main/java/software/xdev/chartjs/model/color/Color.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
/**
2727
* Immutable RGBa color model.
2828
*/
29+
@SuppressWarnings("checkstyle:MagicNumber") // RGB Numbers
2930
public class Color
3031
{
3132
private static final Random RANDOMIZER = new SecureRandom();
@@ -178,7 +179,6 @@ public static Color random()
178179
* Any integer between 0 and 255 (inclusive) is valid.
179180
* </p>
180181
*
181-
* @param channel
182182
* @return true if argument is valid R, G or B value
183183
*/
184184
public static boolean isChannelWithinBounds(final int channel)
@@ -195,7 +195,6 @@ public static boolean isChannelWithinBounds(final int channel)
195195
* Any double between 0.0d and 1.0d (inclusive) is valid.
196196
* </p>
197197
*
198-
* @param alpha
199198
* @return true if argument is valid alpha value
200199
*/
201200
public static boolean isAlphaWithinBounds(final double alpha)

chartjs-java-model/src/main/java/software/xdev/chartjs/model/data/Data.java

Lines changed: 38 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -28,93 +28,104 @@ public class Data<D extends Data<D, T>, T extends Dataset<T, ?>>
2828
{
2929
private final List<String> labels = new ArrayList<>();
3030
private final List<T> datasets = new ArrayList<>();
31-
31+
3232
/**
3333
* @return unmodifiable list of all labels, never {@code null}
3434
*/
35-
public List<String> getLabels() {
35+
public List<String> getLabels()
36+
{
3637
return Collections.unmodifiableList(this.labels);
3738
}
38-
39+
3940
/**
4041
* Sets the backing label list, replacing any labels previously added or set
41-
*
42+
*
4243
* @return this object to allow method chaining
4344
*/
44-
public D setLabels(final Collection<String> labels) {
45+
public D setLabels(final Collection<String> labels)
46+
{
4547
this.labels.clear();
46-
if (labels != null) {
48+
if(labels != null)
49+
{
4750
this.labels.addAll(labels);
4851
}
4952
return this.self();
5053
}
51-
54+
5255
/**
5356
* Sets the backing label list, replacing any labels previously added or set
54-
*
57+
*
5558
* @return this object to allow method chaining
5659
*/
57-
public D setLabels(final String... labels) {
60+
public D setLabels(final String... labels)
61+
{
5862
this.labels.clear();
59-
if (labels != null) {
63+
if(labels != null)
64+
{
6065
this.labels.addAll(Arrays.asList(labels));
6166
}
6267
return this.self();
6368
}
64-
69+
6570
/**
6671
* Removes all labels from the backing list
67-
*
72+
*
6873
* @return this object to allow method chaining
6974
*/
70-
public D clearLabels() {
75+
public D clearLabels()
76+
{
7177
this.labels.clear();
7278
return this.self();
7379
}
74-
80+
7581
/**
7682
* Adds the label to the backing label list
77-
*
83+
*
7884
* @return this object to allow method chaining
7985
*/
80-
public D addLabel(final String label) {
86+
public D addLabel(final String label)
87+
{
8188
this.labels.add(label);
8289
return this.self();
8390
}
84-
91+
8592
/**
8693
* Adds the labels to the backing label list
87-
*
94+
*
8895
* @return this object to allow method chaining
8996
*/
90-
public D addLabels(final String... label) {
97+
public D addLabels(final String... label)
98+
{
9199
this.labels.addAll(Arrays.asList(label));
92100
return this.self();
93101
}
94102

95103
/**
96-
* @return unmodifiable list of all datasets, never
97-
* {@code null}
104+
* @return unmodifiable list of all datasets, never {@code null}
98105
*/
99-
public List<T> getDatasets() {
106+
public List<T> getDatasets()
107+
{
100108
return Collections.unmodifiableList(this.datasets);
101109
}
102-
110+
103111
/**
104112
* @return this object to allow method chaining
105113
*/
106-
public D setDatasets(final Collection<T> datasets) {
114+
public D setDatasets(final Collection<T> datasets)
115+
{
107116
this.datasets.clear();
108-
if (datasets != null) {
117+
if(datasets != null)
118+
{
109119
this.datasets.addAll(datasets);
110120
}
111121
return this.self();
112122
}
113-
123+
114124
/**
115125
* @return this object to allow method chaining
116126
*/
117-
public D addDataset(final T dataset) {
127+
public D addDataset(final T dataset)
128+
{
118129
this.datasets.add(dataset);
119130
return this.self();
120131
}

chartjs-java-model/src/main/java/software/xdev/chartjs/model/enums/BorderJoinStyle.java

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,40 +19,39 @@
1919

2020
import com.fasterxml.jackson.annotation.JsonValue;
2121

22-
public enum BorderJoinStyle {
2322

23+
public enum BorderJoinStyle
24+
{
25+
2426
/**
25-
* Rounds off the corners of a shape by filling an
26-
* additional sector of disc centered at the common endpoint of connected
27-
* segments. The radius for these rounded corners is equal to the line
28-
* width.
27+
* Rounds off the corners of a shape by filling an additional sector of disc centered at the common endpoint of
28+
* connected segments. The radius for these rounded corners is equal to the line width.
2929
*/
3030
ROUND,
3131

3232
/**
33-
* Fills an additional triangular area between the common
34-
* endpoint of connected segments, and the separate outside rectangular
35-
* corners of each segment.
33+
* Fills an additional triangular area between the common endpoint of connected segments, and the separate outside
34+
* rectangular corners of each segment.
3635
*/
3736
BEVEL,
3837

3938
/**
40-
* Connected segments are joined by extending their outside edges to connect
41-
* at a single point, with the effect of filling an additional
42-
* lozenge-shaped area. This setting is effected by the miterLimit property.
39+
* Connected segments are joined by extending their outside edges to connect at a single point, with the effect of
40+
* filling an additional lozenge-shaped area. This setting is effected by the miterLimit property.
4341
*/
4442
MITER;
45-
43+
4644
private final String serialized;
47-
48-
BorderJoinStyle() {
45+
46+
BorderJoinStyle()
47+
{
4948
this.serialized = this.name().toLowerCase(Locale.ENGLISH);
5049
}
51-
50+
5251
@Override
5352
@JsonValue
54-
public String toString() {
53+
public String toString()
54+
{
5555
return this.serialized;
5656
}
57-
5857
}

chartjs-java-model/src/main/java/software/xdev/chartjs/model/enums/BorderSkipped.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,25 @@
1919

2020
import com.fasterxml.jackson.annotation.JsonValue;
2121

22-
public enum BorderSkipped {
23-
22+
23+
public enum BorderSkipped
24+
{
2425
BOTTOM,
2526
LEFT,
2627
TOP,
2728
RIGHT;
2829

2930
private final String serialized;
30-
31-
BorderSkipped() {
31+
32+
BorderSkipped()
33+
{
3234
this.serialized = this.name().toLowerCase(Locale.ENGLISH);
3335
}
34-
36+
3537
@Override
3638
@JsonValue
37-
public String toString() {
39+
public String toString()
40+
{
3841
return this.serialized;
3942
}
40-
4143
}

chartjs-java-model/src/main/java/software/xdev/chartjs/model/options/BarOptions.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ public IndexAxis getIndexAxis()
6161
* <p>
6262
* Default {@code "x"}
6363
* </p>
64-
*
65-
* @param indexAxis
6664
*/
6765
public BarOptions setIndexAxis(final IndexAxis indexAxis)
6866
{

0 commit comments

Comments
 (0)