[Minor] code cleanup
This commit is contained in:
parent
fd50661406
commit
858bf76d65
|
@ -1,12 +1,12 @@
|
|||
/*
|
||||
* Copyright 2013 Robert von Burg <eitch@eitchnet.ch>
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -38,10 +38,13 @@ public class BooleanParameter extends AbstractParameter<Boolean> {
|
|||
|
||||
/**
|
||||
* Default constructors
|
||||
*
|
||||
* @param id the id
|
||||
* @param name the name
|
||||
* @param value the value
|
||||
*
|
||||
* @param id
|
||||
* the id
|
||||
* @param name
|
||||
* the name
|
||||
* @param value
|
||||
* the value
|
||||
*/
|
||||
public BooleanParameter(String id, String name, Boolean value) {
|
||||
super(id, name);
|
||||
|
@ -73,7 +76,7 @@ public class BooleanParameter extends AbstractParameter<Boolean> {
|
|||
|
||||
/**
|
||||
* Sets the value to false
|
||||
*
|
||||
*
|
||||
* @see Parameter#clear()
|
||||
*/
|
||||
@Override
|
||||
|
@ -92,6 +95,11 @@ public class BooleanParameter extends AbstractParameter<Boolean> {
|
|||
return StrolchValueType.BOOLEAN.getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrolchValueType getValueType() {
|
||||
return StrolchValueType.BOOLEAN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BooleanParameter getClone() {
|
||||
BooleanParameter clone = new BooleanParameter();
|
||||
|
@ -118,8 +126,4 @@ public class BooleanParameter extends AbstractParameter<Boolean> {
|
|||
return this.getValue().compareTo(((BooleanParameter) o).getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrolchValueType getValueType() {
|
||||
return StrolchValueType.BOOLEAN;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,6 +98,11 @@ public class DateParameter extends AbstractParameter<Date> {
|
|||
return StrolchValueType.DATE.getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrolchValueType getValueType() {
|
||||
return StrolchValueType.DATE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DateParameter getClone() {
|
||||
DateParameter clone = new DateParameter();
|
||||
|
@ -124,8 +129,4 @@ public class DateParameter extends AbstractParameter<Date> {
|
|||
return this.getValue().compareTo(((DateParameter) o).getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrolchValueType getValueType() {
|
||||
return StrolchValueType.DATE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,6 +95,11 @@ public class DurationParameter extends AbstractParameter<Long> {
|
|||
return StrolchValueType.DURATION.getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrolchValueType getValueType() {
|
||||
return StrolchValueType.DURATION;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DurationParameter getClone() {
|
||||
DurationParameter clone = new DurationParameter();
|
||||
|
@ -121,8 +126,4 @@ public class DurationParameter extends AbstractParameter<Long> {
|
|||
return this.getValue().compareTo(((DurationParameter) o).getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrolchValueType getValueType() {
|
||||
return StrolchValueType.DURATION;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -134,6 +134,11 @@ public class FloatListParameter extends AbstractParameter<List<Double>> implemen
|
|||
return StrolchValueType.FLOAT_LIST.getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrolchValueType getValueType() {
|
||||
return StrolchValueType.FLOAT_LIST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FloatListParameter getClone() {
|
||||
FloatListParameter clone = new FloatListParameter();
|
||||
|
@ -174,8 +179,4 @@ public class FloatListParameter extends AbstractParameter<List<Double>> implemen
|
|||
return Integer.compare(this.getValue().size(), ((FloatListParameter) o).getValue().size());
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrolchValueType getValueType() {
|
||||
return StrolchValueType.FLOAT_LIST;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,6 +96,11 @@ public class FloatParameter extends AbstractParameter<Double> {
|
|||
return StrolchValueType.FLOAT.getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrolchValueType getValueType() {
|
||||
return StrolchValueType.FLOAT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FloatParameter getClone() {
|
||||
FloatParameter clone = new FloatParameter();
|
||||
|
@ -122,8 +127,4 @@ public class FloatParameter extends AbstractParameter<Double> {
|
|||
return this.getValue().compareTo(((FloatParameter) o).getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrolchValueType getValueType() {
|
||||
return StrolchValueType.FLOAT;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -134,6 +134,11 @@ public class IntegerListParameter extends AbstractParameter<List<Integer>> imple
|
|||
return StrolchValueType.INTEGER_LIST.getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrolchValueType getValueType() {
|
||||
return StrolchValueType.INTEGER_LIST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IntegerListParameter getClone() {
|
||||
IntegerListParameter clone = new IntegerListParameter();
|
||||
|
@ -174,8 +179,4 @@ public class IntegerListParameter extends AbstractParameter<List<Integer>> imple
|
|||
return Integer.compare(this.getValue().size(), ((IntegerListParameter) o).getValue().size());
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrolchValueType getValueType() {
|
||||
return StrolchValueType.INTEGER_LIST;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,6 +55,11 @@ public class IntegerParameter extends AbstractParameter<Integer> {
|
|||
return StrolchValueType.INTEGER.getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrolchValueType getValueType() {
|
||||
return StrolchValueType.INTEGER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValueAsString() {
|
||||
return Integer.toString(this.value);
|
||||
|
@ -120,8 +125,4 @@ public class IntegerParameter extends AbstractParameter<Integer> {
|
|||
return this.getValue().compareTo(((IntegerParameter) o).getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrolchValueType getValueType() {
|
||||
return StrolchValueType.INTEGER;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -134,6 +134,11 @@ public class LongListParameter extends AbstractParameter<List<Long>> implements
|
|||
return StrolchValueType.LONG_LIST.getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrolchValueType getValueType() {
|
||||
return StrolchValueType.LONG_LIST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LongListParameter getClone() {
|
||||
LongListParameter clone = new LongListParameter();
|
||||
|
@ -174,8 +179,4 @@ public class LongListParameter extends AbstractParameter<List<Long>> implements
|
|||
return Integer.compare(this.getValue().size(), ((LongListParameter) o).getValue().size());
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrolchValueType getValueType() {
|
||||
return StrolchValueType.LONG_LIST;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,6 +94,11 @@ public class LongParameter extends AbstractParameter<Long> {
|
|||
return StrolchValueType.LONG.getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrolchValueType getValueType() {
|
||||
return StrolchValueType.LONG;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LongParameter getClone() {
|
||||
LongParameter clone = new LongParameter();
|
||||
|
@ -120,8 +125,4 @@ public class LongParameter extends AbstractParameter<Long> {
|
|||
return this.getValue().compareTo(((LongParameter) o).getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrolchValueType getValueType() {
|
||||
return StrolchValueType.LONG;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -134,6 +134,11 @@ public class StringListParameter extends AbstractParameter<List<String>> impleme
|
|||
return StrolchValueType.STRING_LIST.getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrolchValueType getValueType() {
|
||||
return StrolchValueType.STRING_LIST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StringListParameter getClone() {
|
||||
StringListParameter clone = new StringListParameter();
|
||||
|
@ -174,8 +179,4 @@ public class StringListParameter extends AbstractParameter<List<String>> impleme
|
|||
return Integer.compare(this.getValue().size(), ((StringListParameter) o).getValue().size());
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrolchValueType getValueType() {
|
||||
return StrolchValueType.STRING_LIST;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,6 +55,11 @@ public class StringParameter extends AbstractParameter<String> {
|
|||
return StrolchValueType.STRING.getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrolchValueType getValueType() {
|
||||
return StrolchValueType.STRING;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public String getValue() {
|
||||
|
@ -118,8 +123,4 @@ public class StringParameter extends AbstractParameter<String> {
|
|||
return this.getValue().compareToIgnoreCase(((StringParameter) o).getValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public StrolchValueType getValueType() {
|
||||
return StrolchValueType.STRING;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue