A set of characters (typically used for parsing purpose where it is significantly faster than regular expressions for simple patterns).
A parsing cursor over the characters read.
A context for plain text parsing/formatting.
Specifies the default text format of a class (for parsing/formatting).
Text handling package.
double) equivalent to standard String/Double methods?
With Javolution 4.1,
double formatting/parsing is lossless
and functionally the same as with the standard library. Parsing a character
sequence will always result in the same number whether it is performed with
TypeFormat or using
When formatting a
double number, the number of digits output
is adjustable. The default (if the number of digits is unspecified) is
16 when the the 16 digits representation can be parsed back to
double (mimic the standard library formatting).
Javolution parsing/formatting do not generate garbage and has no adverse
effect on GC. Better, it does not force the user to create intermediate
CharSequence/Appendable can be used! Serial parsing is also supported
It all depends of the size of the text to append (the actual size of the document being appended has almost no impact in both cases).
If the text being appended is large (or arbitrarily large) then using
Text is preferable.
"/proj/lodecase/src/com/lodecase/util/bar.java". Can the 'Text' class save us memory when strings have common prefixes?
It depends how you build your text. For example in following code:The prefix (directoryName)is shared between
Text is a binary tree of blocks of characters. In the example,
fooFileName is a node with
head and "foo.java" for tail. The tree is maintained balanced automatically
through tree rotations.
Copyright © 2005-2013 Javolution. All Rights Reserved.