Minor improvements in tool tasks
- Use java 8 types in UpdateDocsTask - Simplify permissions page writing task to write to the file without any options - Various minor simplifications (Java 8) to avoid casting etc.
This commit is contained in:
@@ -3,7 +3,12 @@ package tools.utils;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* Value of a tag.
|
||||
*
|
||||
* @param <T> the tag value type
|
||||
* @see TagReplacer
|
||||
*/
|
||||
public abstract class TagValue<T> {
|
||||
|
||||
private final T value;
|
||||
@@ -18,6 +23,9 @@ public abstract class TagValue<T> {
|
||||
|
||||
public abstract boolean isEmpty();
|
||||
|
||||
/**
|
||||
* Text value.
|
||||
*/
|
||||
public static final class TextTagValue extends TagValue<String> {
|
||||
public TextTagValue(String value) {
|
||||
super(value);
|
||||
@@ -29,9 +37,12 @@ public abstract class TagValue<T> {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* List value (iterable).
|
||||
*/
|
||||
public static final class NestedTagValue extends TagValue<List<TagValueHolder>> {
|
||||
public NestedTagValue() {
|
||||
super(new ArrayList<TagValueHolder>());
|
||||
super(new ArrayList<>());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user