Class AbstractChartParam
- java.lang.Object
-
- com.xpn.xwiki.plugin.charts.params.AbstractChartParam
-
- All Implemented Interfaces:
ChartParam
- Direct Known Subclasses:
BooleanChartParam,ChoiceChartParam,ColorChartParam,DoubleChartParam,FloatChartParam,FontChartParam,IntegerChartParam,ListChartParam,LocaleChartParam,MapChartParam,Point2DChartParam,RectangleInsetsChartParam,ShapeChartParam,StringChartParam,StrokeChartParam
public abstract class AbstractChartParam extends Object implements ChartParam
-
-
Field Summary
Fields Modifier and Type Field Description static StringLIST_SEPARATORstatic StringMAP_ASSIGNMENTstatic StringMAP_SEPARATORprotected Stringnameprotected booleanoptional
-
Constructor Summary
Constructors Constructor Description AbstractChartParam(String name)AbstractChartParam(String name, boolean optional)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Objectconvert(String value)booleanequals(Object obj)protected ObjectgetChoiceArg(Map map, String name, Map choices)protected doublegetDoubleArg(Map map, String name)protected floatgetFloatArg(Map map, String name)protected intgetIntArg(Map map, String name)protected ListgetListArg(Map map, String name)StringgetName()protected StringgetStringArg(Map map, String name)protected StringgetStringOptionalArg(Map map, String name)abstract ClassgetType()inthashCode()booleanisOptional()protected ListparseList(String value)protected MapparseMap(String value)protected MapparseMap(String value, int expectedTokenCount)protected float[]toFloatArray(List list)protected ListtoFloatList(List list)StringtoString()
-
-
-
Field Detail
-
name
protected String name
-
optional
protected boolean optional
-
MAP_SEPARATOR
public static final String MAP_SEPARATOR
- See Also:
- Constant Field Values
-
MAP_ASSIGNMENT
public static final String MAP_ASSIGNMENT
- See Also:
- Constant Field Values
-
LIST_SEPARATOR
public static final String LIST_SEPARATOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfaceChartParam
-
isOptional
public boolean isOptional()
- Specified by:
isOptionalin interfaceChartParam
-
getType
public abstract Class getType()
- Specified by:
getTypein interfaceChartParam
-
convert
public abstract Object convert(String value) throws ParamException
- Specified by:
convertin interfaceChartParam- Throws:
ParamException
-
getStringArg
protected String getStringArg(Map map, String name) throws MissingArgumentException
- Throws:
MissingArgumentException
-
getIntArg
protected int getIntArg(Map map, String name) throws MissingArgumentException, InvalidArgumentException
-
getFloatArg
protected float getFloatArg(Map map, String name) throws MissingArgumentException, InvalidArgumentException
-
getDoubleArg
protected double getDoubleArg(Map map, String name) throws MissingArgumentException, InvalidArgumentException
-
getChoiceArg
protected Object getChoiceArg(Map map, String name, Map choices) throws MissingArgumentException, InvalidArgumentException
-
getListArg
protected List getListArg(Map map, String name) throws MissingArgumentException
- Throws:
MissingArgumentException
-
parseMap
protected Map parseMap(String value) throws InvalidArgumentException
- Throws:
InvalidArgumentException
-
parseMap
protected Map parseMap(String value, int expectedTokenCount) throws InvalidArgumentException
- Throws:
InvalidArgumentException
-
toFloatList
protected List toFloatList(List list) throws InvalidArgumentException
- Throws:
InvalidArgumentException
-
toFloatArray
protected float[] toFloatArray(List list) throws InvalidArgumentException
- Throws:
InvalidArgumentException
-
-