View Javadoc

1   package net.sf.twip.parameterhandler;
2   
3   import net.sf.twip.util.Parameter;
4   
5   public class ShortParameterHandler extends AbstractNumberParameterHandler {
6   
7   	private static final Short[] VALUES = new Short[] { (short) 1, (short) 2, (short) 3, (short) 0,
8   			(short) -1, (short) -2, (short) -3, (short) 127, (short) -127, (short) 1024,
9   			(short) -1024, Short.MAX_VALUE, Short.MIN_VALUE };
10  
11  	public ShortParameterHandler(Parameter parameter) {
12  		super(parameter);
13  	}
14  
15  	@Override
16  	protected Comparable<? extends Number> getComparable(String numberExpression) {
17  		return Short.valueOf(numberExpression);
18  	}
19  
20  	@Override
21  	protected Object[] getDefaultParameterValues() {
22  		return VALUES;
23  	}
24  }