29
29
*/
30
30
public interface FormatterStep extends Serializable {
31
31
/** The name of the step, for debugging purposes. */
32
- public String getName ();
32
+ String getName ();
33
33
34
34
/**
35
35
* Returns a formatted version of the given content.
@@ -43,7 +43,8 @@ public interface FormatterStep extends Serializable {
43
43
* if the formatter step doesn't have any changes to make
44
44
* @throws Exception if the formatter step experiences a problem
45
45
*/
46
- public @ Nullable String format (String rawUnix , File file ) throws Exception ;
46
+ @ Nullable
47
+ String format (String rawUnix , File file ) throws Exception ;
47
48
48
49
/**
49
50
* Returns a new FormatterStep which will only apply its changes
@@ -54,7 +55,7 @@ public interface FormatterStep extends Serializable {
54
55
* @return FormatterStep
55
56
*/
56
57
@ Deprecated
57
- public default FormatterStep filterByContentPattern (String contentPattern ) {
58
+ default FormatterStep filterByContentPattern (String contentPattern ) {
58
59
return filterByContent (OnMatch .INCLUDE , contentPattern );
59
60
}
60
61
@@ -68,7 +69,7 @@ public default FormatterStep filterByContentPattern(String contentPattern) {
68
69
* java regular expression used to filter in or out files which content contain pattern
69
70
* @return FormatterStep
70
71
*/
71
- public default FormatterStep filterByContent (OnMatch onMatch , String contentPattern ) {
72
+ default FormatterStep filterByContent (OnMatch onMatch , String contentPattern ) {
72
73
return new FilterByContentPatternFormatterStep (this , onMatch , contentPattern );
73
74
}
74
75
@@ -78,7 +79,7 @@ public default FormatterStep filterByContent(OnMatch onMatch, String contentPatt
78
79
* <p>
79
80
* The provided filter must be serializable.
80
81
*/
81
- public default FormatterStep filterByFile (SerializableFileFilter filter ) {
82
+ default FormatterStep filterByFile (SerializableFileFilter filter ) {
82
83
return new FilterByFileFormatterStep (this , filter );
83
84
}
84
85
@@ -124,7 +125,7 @@ static <RoundtripState extends Serializable, EqualityState extends Serializable>
124
125
ThrowingEx .Supplier <RoundtripState > roundtripInit ,
125
126
SerializedFunction <RoundtripState , EqualityState > equalityFunc ,
126
127
SerializedFunction <EqualityState , FormatterFunc > formatterFunc ) {
127
- return new FormatterStepSerializationRoundtrip (name , roundtripInit , equalityFunc , formatterFunc );
128
+ return new FormatterStepSerializationRoundtrip <> (name , roundtripInit , equalityFunc , formatterFunc );
128
129
}
129
130
130
131
/**
@@ -160,7 +161,7 @@ static <RoundtripState extends Serializable, EqualityState extends Serializable>
160
161
* only the state supplied by state and nowhere else.
161
162
* @return A FormatterStep
162
163
*/
163
- public static <State extends Serializable > FormatterStep createLazy (
164
+ static <State extends Serializable > FormatterStep createLazy (
164
165
String name ,
165
166
ThrowingEx .Supplier <State > stateSupplier ,
166
167
ThrowingEx .Function <State , FormatterFunc > stateToFormatter ) {
@@ -177,7 +178,7 @@ public static <State extends Serializable> FormatterStep createLazy(
177
178
* only the state supplied by state and nowhere else.
178
179
* @return A FormatterStep
179
180
*/
180
- public static <State extends Serializable > FormatterStep create (
181
+ static <State extends Serializable > FormatterStep create (
181
182
String name ,
182
183
State state ,
183
184
ThrowingEx .Function <State , FormatterFunc > stateToFormatter ) {
@@ -194,7 +195,7 @@ public static <State extends Serializable> FormatterStep create(
194
195
* @return A FormatterStep which will never report that it is up-to-date, because
195
196
* it is not equal to the serialized representation of itself.
196
197
*/
197
- public static FormatterStep createNeverUpToDateLazy (
198
+ static FormatterStep createNeverUpToDateLazy (
198
199
String name ,
199
200
ThrowingEx .Supplier <FormatterFunc > functionSupplier ) {
200
201
return new FormatterStepImpl .NeverUpToDate (name , functionSupplier );
@@ -208,7 +209,7 @@ public static FormatterStep createNeverUpToDateLazy(
208
209
* @return A FormatterStep which will never report that it is up-to-date, because
209
210
* it is not equal to the serialized representation of itself.
210
211
*/
211
- public static FormatterStep createNeverUpToDate (
212
+ static FormatterStep createNeverUpToDate (
212
213
String name ,
213
214
FormatterFunc function ) {
214
215
Objects .requireNonNull (function , "function" );
0 commit comments