mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-28 06:55:02 +08:00
style: enable ConstantName
in checkstyle (#5139)
Co-authored-by: Maria Paszkiewicz SCC <maria.paszkiewicz@kit.edu>
This commit is contained in:
@ -13,7 +13,7 @@ public class Conway {
|
||||
*1s, two 2s, one 1" or 312211. https://en.wikipedia.org/wiki/Look-and-say_sequence
|
||||
* */
|
||||
|
||||
private static final StringBuilder builder = new StringBuilder();
|
||||
private static final StringBuilder BUILDER = new StringBuilder();
|
||||
|
||||
protected static List<String> generateList(String originalString, int maxIteration) {
|
||||
List<String> numbers = new ArrayList<>();
|
||||
@ -25,9 +25,9 @@ public class Conway {
|
||||
}
|
||||
|
||||
public static String generateNextElement(String originalString) {
|
||||
builder.setLength(0);
|
||||
BUILDER.setLength(0);
|
||||
String[] stp = originalString.split("(?<=(.))(?!\\1)");
|
||||
Arrays.stream(stp).forEach(s -> builder.append(s.length()).append(s.charAt(0)));
|
||||
return builder.toString();
|
||||
Arrays.stream(stp).forEach(s -> BUILDER.append(s.length()).append(s.charAt(0)));
|
||||
return BUILDER.toString();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user