Package org.goplanit.tntp
Class TntpHeaderConstants
- java.lang.Object
-
- org.goplanit.tntp.TntpHeaderConstants
-
public class TntpHeaderConstants extends Object
Constants used in the header of TnTp files- Author:
- gman, markr
-
-
Field Summary
Fields Modifier and Type Field Description static String
END_OF_METADATA_INDICATOR
static String
NUMBER_OF_LINKS_INDICATOR
static String
NUMBER_OF_NODES_INDICATOR
static String
NUMBER_OF_ZONES_INDICATOR
-
Constructor Summary
Constructors Constructor Description TntpHeaderConstants()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
parseFromHeader(String line, String header)
Parse a value from one of the headers in the network file
-
-
-
Field Detail
-
NUMBER_OF_ZONES_INDICATOR
public static final String NUMBER_OF_ZONES_INDICATOR
- See Also:
- Constant Field Values
-
NUMBER_OF_NODES_INDICATOR
public static final String NUMBER_OF_NODES_INDICATOR
- See Also:
- Constant Field Values
-
NUMBER_OF_LINKS_INDICATOR
public static final String NUMBER_OF_LINKS_INDICATOR
- See Also:
- Constant Field Values
-
END_OF_METADATA_INDICATOR
public static final String END_OF_METADATA_INDICATOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
parseFromHeader
public static int parseFromHeader(String line, String header) throws Exception
Parse a value from one of the headers in the network file- Parameters:
line
- the current line in the network fileheader
- the header to be parsed- Returns:
- the integer value contained within the specified header section
- Throws:
Exception
- thrown if the contents of the header cannot be parsed into an integer
-
-