org.hd.d.pg2k.svrCore
Class Compact7BitString.WordChars

java.lang.Object
  extended by org.hd.d.pg2k.svrCore.Compact7BitString.WordChars
Enclosing class:
Compact7BitString

private static final class Compact7BitString.WordChars
extends java.lang.Object

Boolean true/false flags for what are considered "word" chars; initialised on first use. Also holds intern()ed one-byte Strings for each token to avoid run-time allocation similar in intent to Integer.valueOf(int).

The word characters are [a-zA-Z_0-9]. The non-word characters are everything else in the [0,127] 7-bit-ASCII alphabet.

These tokens need not be strictly alternating provided thst ambiguity can be avoided.

These tokens are currently not limited in length.

Inspired by the HuffWord compression tokeniser from "Managing Gigabytes".


Field Summary
(package private) static boolean[] isWordChar
          An entry is true if the corresponding ASCII char of the index is a "word" char.
(package private) static java.lang.String[] s
          One-byte intern()ed String for this char.
 
Constructor Summary
private Compact7BitString.WordChars()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isWordChar

static final boolean[] isWordChar
An entry is true if the corresponding ASCII char of the index is a "word" char.


s

static final java.lang.String[] s
One-byte intern()ed String for this char.

Constructor Detail

Compact7BitString.WordChars

private Compact7BitString.WordChars()

DHD Multimedia Gallery V1.50.55

Copyright (c) 1996-2008, Damon Hart-Davis. All rights reserved.