public class

TokenExtractor

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.util.format.TokenExtractor

Class Overview

A customizable string token extractor. Standard delimiters are provided: see DF_xxx objects.

Summary

Nested Classes
interface TokenExtractor.IDelimiterFinder Definition of a delimiter. 
Fields
public static final TokenExtractor.IDelimiterFinder DF_CommonSymbolChars Delimiter= any character that is generally not legal in a symbol name
public static final TokenExtractor.IDelimiterFinder DF_NonAlphaNum Delimiter= any character that is neither a letter for a digit
public static final TokenExtractor.IDelimiterFinder DF_WhiteSpace Delimiter= whitespace character
Public Constructors
TokenExtractor(TokenExtractor.IDelimiterFinder delimiterFinder)
Create a token extractor.
Public Methods
String extract(String s, int o)
Extract the token spanning over the provided offset of the input string.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final TokenExtractor.IDelimiterFinder DF_CommonSymbolChars

Delimiter= any character that is generally not legal in a symbol name

public static final TokenExtractor.IDelimiterFinder DF_NonAlphaNum

Delimiter= any character that is neither a letter for a digit

public static final TokenExtractor.IDelimiterFinder DF_WhiteSpace

Delimiter= whitespace character

Public Constructors

public TokenExtractor (TokenExtractor.IDelimiterFinder delimiterFinder)

Create a token extractor.

Parameters
delimiterFinder a delimiter finder; client code may either create their own or use one of the standard finders, see DF_*

Public Methods

public String extract (String s, int o)

Extract the token spanning over the provided offset of the input string.