THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Page properties | |
---|---|
|
...
...
|
...
|
...
|
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
...
3) The ParamInfoFactory class provides APIs to build a ParamInfo.
Code Block | ||
---|---|---|
| ||
public class ParamInfoFactory {
public static <V> ParamInfoBuilder<V> createParamInfo(String name, Class<V> valueClass) {...}
public static class ParamInfoBuilder<V> {
ParamInfoBuilder(String name, Class<V> valueClass) {...}
public ParamInfoBuilder<V> setAlias(String[] alias) {...}
public ParamInfoBuilder<V> setDescription(String description) {...}
public ParamInfoBuilder<V> setOptional() {...}
public ParamInfoBuilder<V> setRequired() {...}
public ParamInfoBuilder<V> setHasDefaultValue(V defaultValue) {...}
public ParamInfoBuilder<V> setValidator(ParamValidator<V> validator) {...}
public ParamInfo<V> build() {...}
}
} |
...
2) We propose to add the following subclasses of Param<?> to simplify the creation of parameters with primitive-typed values (e.g. long, int, boolean).
Code Block | ||
---|---|---|
| ||
public class BooleanParam extends Param<Boolean> {
...
}
public class IntParam extends Param<Integer> {
...
}
public class LongParam extends Param<Long> {
...
}
public class FloatParam extends Param<Float> {
...
}
public class DoubleParam extends Param<Double> {
...
}
public class StringParam extends Param<String> {
...
}
public class IntArrayParam extends Param<Integer[]> {
...
}
public class LongArrayParam extends Param<Long[]> {
...
}
public class FloatArrayParam extends Param<Float[]> {
...
}
public class DoubleArrayParam extends Param<Double[]> {
...
}
|
...