NASA World Wind

gov.nasa.worldwind.ogc.collada
Class ColladaFloatArray

java.lang.Object
  extended by gov.nasa.worldwind.util.xml.AbstractXMLEventParser
      extended by gov.nasa.worldwind.ogc.collada.ColladaAbstractObject
          extended by gov.nasa.worldwind.ogc.collada.ColladaFloatArray
All Implemented Interfaces:
XMLEventParser

public class ColladaFloatArray
extends ColladaAbstractObject

Represents the COLLADA float_array element and provides access to its contents.


Field Summary
protected  float[] floats
          Floats parsed from this element.
 
Fields inherited from class gov.nasa.worldwind.util.xml.AbstractXMLEventParser
CHARACTERS_CONTENT, fields, namespaceURI, parent
 
Constructor Summary
ColladaFloatArray(String ns)
          Construct an instance.
 
Method Summary
 float[] getFloats()
          Indicates the float array contained in this element.
 Object parse(XMLEventParserContext ctx, XMLEvent event, Object... args)
          Parse the event and initialize the parser's values to those found in the event.
protected  float[] parseFloats(String floatArrayString)
          Parse a string of floats into an array.
 
Methods inherited from class gov.nasa.worldwind.ogc.collada.ColladaAbstractObject
getLocalExtent, getRoot
 
Methods inherited from class gov.nasa.worldwind.util.xml.AbstractXMLEventParser
allocate, doAddCharacters, doAddEventAttribute, doAddEventContent, doParseEventAttributes, doParseEventContent, freeResources, getAConstructor, getCharacters, getField, getField, getFields, getNamespaceURI, getParent, hasField, hasField, hasFields, mergeFields, newInstance, overrideFields, parseCharacterContent, removeField, setField, setField, setFields, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

floats

protected float[] floats
Floats parsed from this element.

Constructor Detail

ColladaFloatArray

public ColladaFloatArray(String ns)
Construct an instance.

Parameters:
ns - the qualifying namespace URI. May be null to indicate no namespace qualification.
Method Detail

getFloats

public float[] getFloats()
Indicates the float array contained in this element.

Returns:
Floats contained in this element. May return an empty array, but will not return null.

parse

public Object parse(XMLEventParserContext ctx,
                    XMLEvent event,
                    Object... args)
             throws XMLStreamException
Parse the event and initialize the parser's values to those found in the event. Overridden to parse character content into a float[].

Specified by:
parse in interface XMLEventParser
Overrides:
parse in class AbstractXMLEventParser
Parameters:
ctx - a current parser context.
event - the event to parse.
args - an optional list of arguments that may by used by subclasses.
Returns:
if parsing is successful, returns this, otherwise returns null.
Throws:
XMLStreamException - if an exception occurs during event-stream reading.

parseFloats

protected float[] parseFloats(String floatArrayString)
Parse a string of floats into an array.

Parameters:
floatArrayString - String of floats separated by whitespace.
Returns:
Array of parsed floats.

NASA World Wind