Package repast.simphony.integration
Enum Class DataFileElementReader
- All Implemented Interfaces:
Serializable
,Comparable<DataFileElementReader>
,java.lang.constant.Constable
This handles the reading of elements of a data file. Each element of the enum will handle a
different type of element (the element with the same tag as the enum element).
- Author:
- Jerry Vos
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<org.jdom.Element>
fakeRecord
(DataFileReader parserInst, OutputBuilder<?, ?> outWriter, org.jdom.Element recordElement) static DataFileElementReader
getElementHandler
(org.jdom.Element nodeToHandle) abstract Object[]
handle
(DataFileReader parserInst, OutputBuilder<?, ?> outWriter, org.jdom.Element nodeToHandle) Handles the specified node.static DataFileElementReader
Returns the enum constant of this class with the specified name.static DataFileElementReader[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FILE_DEF
Handler for FileDef tags -
DATA
Handler for data tags. -
RECORD
Handler for record elements. -
TABLE
-
ARRAY
-
BRANCH
Handler for branch elements.
-
-
Field Details
-
STRING_DELIMITER
-
DOUBLE_PATTERN
-
INT_PATTERN
-
tag
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getElementHandler
-
handle
public abstract Object[] handle(DataFileReader parserInst, OutputBuilder<?, ?> outWriter, org.jdom.Element nodeToHandle) throws IOExceptionHandles the specified node. Any elements to be added to the data tree should be added in this method and also returned by this method.- Parameters:
parserInst
- the instance of the reader that this is working withOutputBuilder
- the writer to use for writingnodeToHandle
- the node providing data- Returns:
- any elements added to the data tree
- Throws:
IOException
- when there is an error reading
-
fakeRecord
public static List<org.jdom.Element> fakeRecord(DataFileReader parserInst, OutputBuilder<?, ?> outWriter, org.jdom.Element recordElement) throws IOException- Throws:
IOException
-