Class FloatArrayProducer
java.lang.Object
org.apache.batik.parser.DefaultNumberListHandler
org.apache.batik.parser.FloatArrayProducer
- All Implemented Interfaces:
NumberListHandler, PointsHandler
A handler class that generates an array of floats from parsing a
number list or a point list.
- Version:
- $Id$
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected float[]The currentfloat[]object.protected LinkedListList offloat[]objects.protected intThe total number of floats accumulated.protected intThe index in which to store the next number.Fields inherited from class DefaultNumberListHandler
INSTANCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInvoked when the number list attribute ends.voidImplementsPointsHandler.endPoints().float[]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).voidInvoked when the number list attribute starts.voidImplementsPointsHandler.startPoints().Methods inherited from class DefaultNumberListHandler
endNumber, startNumber
-
Field Details
-
as
List offloat[]objects. -
a
protected float[] aThe currentfloat[]object. -
index
protected int indexThe index in which to store the next number. -
count
protected int countThe total number of floats accumulated.
-
-
Constructor Details
-
FloatArrayProducer
public FloatArrayProducer()
-
-
Method Details
-
getFloatArray
public float[] getFloatArray()Returns the array of floats accumulated. -
startNumberList
Invoked 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
Invoked 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
Invoked 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
ImplementsPointsHandler.startPoints().- Specified by:
startPointsin interfacePointsHandler- Throws:
ParseException- if an error occured while processing the points
-
point
ImplementsPointsHandler.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
ImplementsPointsHandler.endPoints().- Specified by:
endPointsin interfacePointsHandler- Throws:
ParseException- if an error occured while processing the points
-