Package org.apache.batik.parser
Class FloatArrayProducer
- java.lang.Object
-
- org.apache.batik.parser.DefaultNumberListHandler
-
- org.apache.batik.parser.FloatArrayProducer
-
- All Implemented Interfaces:
NumberListHandler,PointsHandler
public class FloatArrayProducer extends DefaultNumberListHandler implements PointsHandler
A handler class that generates an array of floats from parsing a number list or a point list.- Version:
- $Id: FloatArrayProducer.java 1804130 2017-08-04 14:41:11Z ssteiner $
-
-
Field Summary
Fields Modifier and Type Field Description protected float[]aThe currentfloat[]object.protected java.util.LinkedListasList offloat[]objects.protected intcountThe total number of floats accumulated.protected intindexThe index in which to store the next number.-
Fields inherited from class org.apache.batik.parser.DefaultNumberListHandler
INSTANCE
-
-
Constructor Summary
Constructors Constructor Description FloatArrayProducer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendNumberList()Invoked when the number list attribute ends.voidendPoints()ImplementsPointsHandler.endPoints().float[]getFloatArray()Returns the array of floats accumulated.voidnumberValue(float v)Invoked when a float value has been parsed.voidpoint(float x, float y)ImplementsPointsHandler.point(float,float).voidstartNumberList()Invoked when the number list attribute starts.voidstartPoints()ImplementsPointsHandler.startPoints().-
Methods inherited from class org.apache.batik.parser.DefaultNumberListHandler
endNumber, startNumber
-
-
-
-
Method Detail
-
getFloatArray
public float[] getFloatArray()
Returns the array of floats accumulated.
-
startNumberList
public void startNumberList() throws ParseExceptionInvoked when the number list attribute starts.- Specified by:
startNumberListin interfaceNumberListHandler- Overrides:
startNumberListin classDefaultNumberListHandler- Throws:
ParseException- if an error occures while processing the number list.
-
numberValue
public void numberValue(float v) throws ParseExceptionInvoked when a float value has been parsed.- Specified by:
numberValuein interfaceNumberListHandler- Overrides:
numberValuein classDefaultNumberListHandler- Throws:
ParseException- if an error occures while processing the number
-
endNumberList
public void endNumberList() throws ParseExceptionInvoked when the number list attribute ends.- Specified by:
endNumberListin interfaceNumberListHandler- Overrides:
endNumberListin classDefaultNumberListHandler- Throws:
ParseException- if an error occures while processing the number list.
-
startPoints
public void startPoints() throws ParseExceptionImplementsPointsHandler.startPoints().- Specified by:
startPointsin interfacePointsHandler- Throws:
ParseException- if an error occured while processing the points
-
point
public void point(float x, float y) throws ParseExceptionImplementsPointsHandler.point(float,float).- Specified by:
pointin interfacePointsHandler- Parameters:
x- the x coordinate of the pointy- the y coordinate of the point- Throws:
ParseException- if an error occured while processing the points
-
endPoints
public void endPoints() throws ParseExceptionImplementsPointsHandler.endPoints().- Specified by:
endPointsin interfacePointsHandler- Throws:
ParseException- if an error occured while processing the points
-
-