Package org.biojavax.bio.phylo.io.nexus
Class DistancesBlockParser
- java.lang.Object
-
- org.biojavax.bio.phylo.io.nexus.NexusBlockParser.Abstract
-
- org.biojavax.bio.phylo.io.nexus.DistancesBlockParser
-
- All Implemented Interfaces:
NexusBlockParser
public class DistancesBlockParser extends NexusBlockParser.Abstract
Parses Nexus distances blocks.- Since:
- 1.6
- Author:
- Richard Holland, Tobias Thierer, Jim Balhoff
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.biojavax.bio.phylo.io.nexus.NexusBlockParser
NexusBlockParser.Abstract
-
-
Field Summary
-
Fields inherited from interface org.biojavax.bio.phylo.io.nexus.NexusBlockParser
UNKNOWN_BLOCK
-
-
Constructor Summary
Constructors Constructor Description DistancesBlockParser(DistancesBlockListener blockListener)
Delegates to NexusBlockParser.Abstract.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
parseToken(String token)
Notifies the parser of the next token.void
resetStatus()
This function is called when the parser is reset before starting a new block.boolean
wantsBracketsAndBraces()
Does the listener want to know about brackets and braces as separate tokens?-
Methods inherited from class org.biojavax.bio.phylo.io.nexus.NexusBlockParser.Abstract
beginComment, commentText, endBlock, endComment, endTokenGroup, getBlockListener, getBlockName, startBlock
-
-
-
-
Constructor Detail
-
DistancesBlockParser
public DistancesBlockParser(DistancesBlockListener blockListener)
Delegates to NexusBlockParser.Abstract.- Parameters:
blockListener
- the listener to send parse events to.
-
-
Method Detail
-
resetStatus
public void resetStatus()
Description copied from class:NexusBlockParser.Abstract
This function is called when the parser is reset before starting a new block.- Specified by:
resetStatus
in classNexusBlockParser.Abstract
-
wantsBracketsAndBraces
public boolean wantsBracketsAndBraces()
Description copied from interface:NexusBlockParser
Does the listener want to know about brackets and braces as separate tokens?- Specified by:
wantsBracketsAndBraces
in interfaceNexusBlockParser
- Overrides:
wantsBracketsAndBraces
in classNexusBlockParser.Abstract
- Returns:
- true if it does.
-
parseToken
public void parseToken(String token) throws ParseException
Description copied from interface:NexusBlockParser
Notifies the parser of the next token. Comment tokens will already have been parsed out and sent separately to the text() method of the listener. Quoted strings will have been parsed and underscores converted. What this token contains is the full string, after removal of quotes if necessary. The token will never be only whitespace.- Specified by:
parseToken
in interfaceNexusBlockParser
- Specified by:
parseToken
in classNexusBlockParser.Abstract
- Parameters:
token
- the token to parse.- Throws:
ParseException
- if the token is unparseable.
-
-