Javolution 6.0.0 java
TextBuilder.java
Go to the documentation of this file.
1 /*
2  * Javolution - Java(TM) Solution for Real-Time and Embedded Systems
3  * Copyright (C) 2012 - Javolution (http://javolution.org/)
4  * All rights reserved.
5  *
6  * Permission to use, copy, modify, and distribute this software is
7  * freely granted, provided that this notice is preserved.
8  */
9 package javolution.text;
10 
11 import java.io.Serializable;
12 import javolution.lang.MathLib;
13 
29 public class TextBuilder implements Appendable, CharSequence, Serializable {
30 
31  private static final long serialVersionUID = 0x600L; // Version.
32  // We do a full resize (and copy) only when the capacity is less than C1.
33  // For large collections, multi-dimensional arrays are employed.
34  private static final int B0 = 5; // Initial capacity in bits.
35  private static final int C0 = 1 << B0; // Initial capacity (32)
36  private static final int B1 = 10; // Low array maximum capacity in bits.
37  private static final int C1 = 1 << B1; // Low array maximum capacity (1024).
38  private static final int M1 = C1 - 1; // Mask.
39  // Resizes up to 1024 maximum (32, 64, 128, 256, 512, 1024).
40  private char[] _low = new char[C0];
41  // For larger capacity use multi-dimensional array.
42  private char[][] _high = new char[1][];
43 
47  private int _length;
48 
52  private int _capacity = C0;
53 
57  public TextBuilder() {
58  _high[0] = _low;
59  }
60 
67  public TextBuilder(String str) {
68  this();
69  append(str);
70  }
71 
79  public TextBuilder(int capacity) {
80  this();
81  while (capacity > _capacity) {
83  }
84  }
85 
91  public final int length() {
92  return _length;
93  }
94 
103  public final char charAt(int index) {
104  if (index >= _length)
105  throw new IndexOutOfBoundsException();
106  return index < C1 ? _low[index] : _high[index >> B1][index & M1];
107  }
108 
121  public final void getChars(int srcBegin, int srcEnd, char[] dst,
122  int dstBegin) {
123  if ((srcBegin < 0) || (srcBegin > srcEnd) || (srcEnd > this._length))
124  throw new IndexOutOfBoundsException();
125  for (int i = srcBegin, j = dstBegin; i < srcEnd;) {
126  char[] chars0 = _high[i >> B1];
127  int i0 = i & M1;
128  int length = MathLib.min(C1 - i0, srcEnd - i);
129  System.arraycopy(chars0, i0, dst, j, length);
130  i += length;
131  j += length;
132  }
133  }
134 
143  public final void setCharAt(int index, char c) {
144  if ((index < 0) || (index >= _length))
145  throw new IndexOutOfBoundsException();
146  _high[index >> B1][index & M1] = c;
147  }
148 
156  public final void setLength(int newLength) {
157  setLength(newLength, '\u0000');
158  }
159 
169  public final void setLength(int newLength, char fillChar) {
170  if (newLength < 0)
171  throw new IndexOutOfBoundsException();
172  if (newLength <= _length)
173  _length = newLength;
174  else
175  for (int i = _length; i++ < newLength;) {
176  append(fillChar);
177  }
178  }
179 
190  public final java.lang.CharSequence subSequence(int start, int end) {
191  if ((start < 0) || (end < 0) || (start > end) || (end > _length))
192  throw new IndexOutOfBoundsException();
193  return Text.valueOf(this, start, end);
194  }
195 
202  public final TextBuilder append(char c) {
203  if (_length >= _capacity)
205  _high[_length >> B1][_length & M1] = c;
206  _length++;
207  return this;
208  }
209 
215  public final TextBuilder append(Object obj) {
216  if (obj == null) return append("null");
217  TextFormat<Object> textFormat = TextContext.getFormat(obj.getClass());
218  if (textFormat == null) return append(obj.toString());
219  return textFormat.format(obj, this);
220  }
221 
230  public final TextBuilder append(CharSequence csq) {
231  return (csq == null) ? append("null") : append(csq, 0, csq.length());
232  }
233 
246  public final TextBuilder append(CharSequence csq, int start,
247  int end) {
248  if (csq == null)
249  return append("null");
250  if ((start < 0) || (end < 0) || (start > end) || (end > csq.length()))
251  throw new IndexOutOfBoundsException();
252  for (int i = start; i < end;) {
253  append(csq.charAt(i++));
254  }
255  return this;
256  }
257 
266  public final TextBuilder append(String str) {
267  return (str == null) ? append("null") : append(str, 0, str.length());
268  }
269 
282  public final TextBuilder append(String str, int start, int end) {
283  if (str == null)
284  return append("null");
285  if ((start < 0) || (end < 0) || (start > end) || (end > str.length()))
286  throw new IndexOutOfBoundsException("start: " + start + ", end: "
287  + end + ", str.length(): " + str.length());
288  int newLength = _length + end - start;
289  while (_capacity < newLength) {
291  }
292  for (int i = start, j = _length; i < end;) {
293  char[] chars = _high[j >> B1];
294  int dstBegin = j & M1;
295  int inc = MathLib.min(C1 - dstBegin, end - i);
296  str.getChars(i, (i += inc), chars, dstBegin);
297  j += inc;
298  }
299  _length = newLength;
300  return this;
301  }
302 
311  public final TextBuilder append(Text txt) {
312  return (txt == null) ? append("null") : append(txt, 0, txt.length());
313  }
314 
327  public final TextBuilder append(Text txt, int start, int end) {
328  if (txt == null)
329  return append("null");
330  if ((start < 0) || (end < 0) || (start > end) || (end > txt.length()))
331  throw new IndexOutOfBoundsException();
332  int newLength = _length + end - start;
333  while (_capacity < newLength) {
335  }
336  for (int i = start, j = _length; i < end;) {
337  char[] chars = _high[j >> B1];
338  int dstBegin = j & M1;
339  int inc = MathLib.min(C1 - dstBegin, end - i);
340  txt.getChars(i, (i += inc), chars, dstBegin);
341  j += inc;
342  }
343  _length = newLength;
344  return this;
345  }
346 
353  public final TextBuilder append(char chars[]) {
354  append(chars, 0, chars.length);
355  return this;
356  }
357 
368  public final TextBuilder append(char chars[], int offset, int length) {
369  final int end = offset + length;
370  if ((offset < 0) || (length < 0) || (end > chars.length))
371  throw new IndexOutOfBoundsException();
372  int newLength = _length + length;
373  while (_capacity < newLength) {
375  }
376  for (int i = offset, j = _length; i < end;) {
377  char[] dstChars = _high[j >> B1];
378  int dstBegin = j & M1;
379  int inc = MathLib.min(C1 - dstBegin, end - i);
380  System.arraycopy(chars, i, dstChars, dstBegin, inc);
381  i += inc;
382  j += inc;
383  }
384  _length = newLength;
385  return this;
386  }
387 
396  public final TextBuilder append(boolean b) {
397  return b ? append("true") : append("false");
398  }
399 
407  public final TextBuilder append(int i) {
408  if (i <= 0) {
409  if (i == 0)
410  return append("0");
411  if (i == Integer.MIN_VALUE) // Negation would overflow.
412  return append("-2147483648");
413  append('-');
414  i = -i;
415  }
416  int digits = MathLib.digitLength(i);
417  if (_capacity < _length + digits)
419  _length += digits;
420  for (int index = _length - 1;; index--) {
421  int j = i / 10;
422  _high[index >> B1][index & M1] = (char) ('0' + i - (j * 10));
423  if (j == 0)
424  return this;
425  i = j;
426  }
427  }
428 
437  public final TextBuilder append(int i, int radix) {
438  if (radix == 10)
439  return append(i); // Faster.
440  if (radix < 2 || radix > 36)
441  throw new IllegalArgumentException("radix: " + radix);
442  if (i < 0) {
443  append('-');
444  if (i == Integer.MIN_VALUE) { // Negative would overflow.
445  appendPositive(-(i / radix), radix);
446  return (TextBuilder) append(DIGIT_TO_CHAR[-(i % radix)]);
447  }
448  i = -i;
449  }
450  appendPositive(i, radix);
451  return this;
452  }
453 
454  private void appendPositive(int l1, int radix) {
455  if (l1 >= radix) {
456  int l2 = l1 / radix;
457  // appendPositive(l2, radix);
458  if (l2 >= radix) {
459  int l3 = l2 / radix;
460  // appendPositive(l3, radix);
461  if (l3 >= radix) {
462  int l4 = l3 / radix;
463  appendPositive(l4, radix);
464  append(DIGIT_TO_CHAR[l3 - (l4 * radix)]);
465  } else
466  append(DIGIT_TO_CHAR[l3]);
467  append(DIGIT_TO_CHAR[l2 - (l3 * radix)]);
468  } else
469  append(DIGIT_TO_CHAR[l2]);
470  append(DIGIT_TO_CHAR[l1 - (l2 * radix)]);
471  } else
472  append(DIGIT_TO_CHAR[l1]);
473  }
474 
475  private final static char[] DIGIT_TO_CHAR = { '0', '1', '2', '3', '4', '5',
476  '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
477  'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
478  'w', 'x', 'y', 'z' };
479 
487  public final TextBuilder append(long l) {
488  if (l <= 0) {
489  if (l == 0)
490  return append("0");
491  if (l == Long.MIN_VALUE) // Negation would overflow.
492  return append("-9223372036854775808");
493  append('-');
494  l = -l;
495  }
496  if (l <= Integer.MAX_VALUE)
497  return append((int) l);
498  append(l / 1000000000);
499  int i = (int) (l % 1000000000);
500  int digits = MathLib.digitLength(i);
501  append("000000000", 0, 9 - digits);
502  return append(i);
503  }
504 
513  public final TextBuilder append(long l, int radix) {
514  if (radix == 10)
515  return append(l); // Faster.
516  if (radix < 2 || radix > 36)
517  throw new IllegalArgumentException("radix: " + radix);
518  if (l < 0) {
519  append('-');
520  if (l == Long.MIN_VALUE) { // Negative would overflow.
521  appendPositive(-(l / radix), radix);
522  return (TextBuilder) append(DIGIT_TO_CHAR[(int) -(l % radix)]);
523  }
524  l = -l;
525  }
526  appendPositive(l, radix);
527  return this;
528  }
529 
530  private void appendPositive(long l1, int radix) {
531  if (l1 >= radix) {
532  long l2 = l1 / radix;
533  // appendPositive(l2, radix);
534  if (l2 >= radix) {
535  long l3 = l2 / radix;
536  // appendPositive(l3, radix);
537  if (l3 >= radix) {
538  long l4 = l3 / radix;
539  appendPositive(l4, radix);
540  append(DIGIT_TO_CHAR[(int) (l3 - (l4 * radix))]);
541  } else
542  append(DIGIT_TO_CHAR[(int) l3]);
543  append(DIGIT_TO_CHAR[(int) (l2 - (l3 * radix))]);
544  } else
545  append(DIGIT_TO_CHAR[(int) l2]);
546  append(DIGIT_TO_CHAR[(int) (l1 - (l2 * radix))]);
547  } else
548  append(DIGIT_TO_CHAR[(int) l1]);
549  }
550 
557  public final TextBuilder append(float f) {
558  return append(f, 10, (MathLib.abs(f) >= 1E7)
559  || (MathLib.abs(f) < 0.001), false);
560  }
561 
572  public final TextBuilder append(double d) {
573  return append(d, -1, (MathLib.abs(d) >= 1E7)
574  || (MathLib.abs(d) < 0.001), false);
575  }
576 
592  public final TextBuilder append(double d, int digits, boolean scientific,
593  boolean showZero) {
594  if (digits > 19)
595  throw new IllegalArgumentException("digits: " + digits);
596  if (d != d) // NaN
597  return append("NaN");
598  if (d == Double.POSITIVE_INFINITY)
599  return append("Infinity");
600  if (d == Double.NEGATIVE_INFINITY)
601  return append("-Infinity");
602  if (d == 0.0) { // Zero.
603  if (digits < 0)
604  return append("0.0");
605  append('0');
606  if (showZero) {
607  append('.');
608  for (int j = 1; j < digits; j++) {
609  append('0');
610  }
611  }
612  return this;
613  }
614  if (d < 0) { // Work with positive number.
615  d = -d;
616  append('-');
617  }
618 
619  // Find the exponent e such as: value == x.xxx * 10^e
620  int e = MathLib.floorLog10(d);
621 
622  long m;
623  if (digits < 0) { // Use 16 or 17 digits.
624  // Try 17 digits.
625  long m17 = MathLib.toLongPow10(d, (17 - 1) - e);
626  // Check if we can use 16 digits.
627  long m16 = m17 / 10;
628  double dd = MathLib.toDoublePow10(m16, e - 16 + 1);
629  if (dd == d) { // 16 digits is enough.
630  digits = 16;
631  m = m16;
632  } else { // We cannot remove the last digit.
633  digits = 17;
634  m = m17;
635  }
636  } else
637  // Use the specified number of digits.
638  m = MathLib.toLongPow10(d, (digits - 1) - e);
639 
640  // Formats.
641  if (scientific || (e >= digits)) {
642  // Scientific notation has to be used ("x.xxxEyy").
643  long pow10 = POW10_LONG[digits - 1];
644  int k = (int) (m / pow10); // Single digit.
645  append((char) ('0' + k));
646  m = m - pow10 * k;
647  appendFraction(m, digits - 1, showZero);
648  append('E');
649  append(e);
650  } else { // Dot within the string ("xxxx.xxxxx").
651  int exp = digits - e - 1;
652  if (exp < POW10_LONG.length) {
653  long pow10 = POW10_LONG[exp];
654  long l = m / pow10;
655  append(l);
656  m = m - pow10 * l;
657  } else
658  append('0'); // Result of the division by a power of 10 larger than any long.
659  appendFraction(m, exp, showZero);
660  }
661  return this;
662  }
663 
664  private void appendFraction(long l, int digits, boolean showZero) {
665  append('.');
666  if (l == 0)
667  if (showZero)
668  for (int i = 0; i < digits; i++) {
669  append('0');
670  }
671  else
672  append('0');
673  else { // l is different from zero.
674  int length = MathLib.digitLength(l);
675  for (int j = length; j < digits; j++) {
676  append('0'); // Add leading zeros.
677  }
678  if (!showZero)
679  while (l % 10 == 0) {
680  l /= 10; // Remove trailing zeros.
681  }
682  append(l);
683  }
684  }
685 
686  private static final long[] POW10_LONG = new long[] { 1L, 10L, 100L, 1000L,
687  10000L, 100000L, 1000000L, 10000000L, 100000000L, 1000000000L,
688  10000000000L, 100000000000L, 1000000000000L, 10000000000000L,
689  100000000000000L, 1000000000000000L, 10000000000000000L,
690  100000000000000000L, 1000000000000000000L };
691 
701  public final TextBuilder insert(int index, java.lang.CharSequence csq) {
702  if ((index < 0) || (index > _length))
703  throw new IndexOutOfBoundsException("index: " + index);
704  final int shift = csq.length();
705  int newLength = _length + shift;
706  while (newLength >= _capacity) {
708  }
709  _length = newLength;
710  for (int i = _length - shift; --i >= index;) {
711  this.setCharAt(i + shift, this.charAt(i));
712  }
713  for (int i = csq.length(); --i >= 0;) {
714  this.setCharAt(index + i, csq.charAt(i));
715  }
716  return this;
717  }
718 
725  public final TextBuilder clear() {
726  _length = 0;
727  return this;
728  }
729 
739  public final TextBuilder delete(int start, int end) {
740  if ((start < 0) || (end < 0) || (start > end) || (end > this.length()))
741  throw new IndexOutOfBoundsException();
742  for (int i = end, j = start; i < _length;) {
743  this.setCharAt(j++, this.charAt(i++));
744  }
745  _length -= end - start;
746  return this;
747  }
748 
754  public final TextBuilder reverse() {
755  final int n = _length - 1;
756  for (int j = (n - 1) >> 1; j >= 0;) {
757  char c = charAt(j);
758  setCharAt(j, charAt(n - j));
759  setCharAt(n - j--, c);
760  }
761  return this;
762  }
763 
769  public final Text toText() {
770  return Text.valueOf(this, 0, _length);
771  }
772 
779  @Override
780  public final String toString() {
781  return (_length < C1) ? new String(_low, 0, _length) : toLargeString();
782  }
783 
784  private String toLargeString() {
785  char[] data = new char[_length];
786  this.getChars(0, _length, data, 0);
787  return new String(data, 0, _length);
788  }
789 
796  public final CharArray toCharArray() {
797  CharArray cArray = new CharArray();
798  char[] data;
799  if (_length < C1) {
800  data = _low;
801  } else {
802  data = new char[_length];
803  this.getChars(0, _length, data, 0);
804  }
805  cArray.setArray(data, 0, _length);
806  return cArray;
807  }
808 
814  @Override
815  public final int hashCode() {
816  int h = 0;
817  for (int i = 0; i < _length;) {
818  h = 31 * h + charAt(i++);
819  }
820  return h;
821  }
822 
832  @Override
833  public final boolean equals(Object obj) {
834  if (this == obj)
835  return true;
836  if (!(obj instanceof TextBuilder))
837  return false;
838  TextBuilder that = (TextBuilder) obj;
839  if (this._length != that._length)
840  return false;
841  for (int i = 0; i < _length;) {
842  if (this.charAt(i) != that.charAt(i++))
843  return false;
844  }
845  return true;
846  }
847 
856  public final boolean contentEquals(java.lang.CharSequence csq) {
857  if (csq.length() != _length)
858  return false;
859  for (int i = 0; i < _length;) {
860  char c = _high[i >> B1][i & M1];
861  if (csq.charAt(i++) != c)
862  return false;
863  }
864  return true;
865  }
866 
870  private void increaseCapacity() {
871  if (_capacity < C1) { // For small capacity, resize.
872  _capacity <<= 1;
873  char[] tmp = new char[_capacity];
874  System.arraycopy(_low, 0, tmp, 0, _length);
875  _low = tmp;
876  _high[0] = tmp;
877  } else { // Add a new low block of 1024 elements.
878  int j = _capacity >> B1;
879  if (j >= _high.length) { // Resizes _high.
880  char[][] tmp = new char[_high.length * 2][];
881  System.arraycopy(_high, 0, tmp, 0, _high.length);
882  _high = tmp;
883  }
884  _high[j] = new char[C1];
885  _capacity += C1;
886  }
887  }
888 }
javolution.text.TextContext.getFormat
static< T > TextFormat< T > getFormat(Class<? extends T > type)
Definition: TextContext.java:69
javolution.text.Text.length
int length()
Definition: Text.java:346
javolution.text.TextBuilder._capacity
int _capacity
Definition: TextBuilder.java:52
javolution.text.TextBuilder.append
final TextBuilder append(Text txt, int start, int end)
Definition: TextBuilder.java:327
javolution.text.TextBuilder.B1
static final int B1
Definition: TextBuilder.java:36
javolution.text.CharArray
Definition: CharArray.java:36
javolution.text.TextBuilder.C0
static final int C0
Definition: TextBuilder.java:35
javolution.text.TextBuilder.insert
final TextBuilder insert(int index, java.lang.CharSequence csq)
Definition: TextBuilder.java:701
javolution
javolution.text.TextBuilder.append
final TextBuilder append(CharSequence csq)
Definition: TextBuilder.java:230
javolution.text.TextBuilder.append
final TextBuilder append(int i, int radix)
Definition: TextBuilder.java:437
javolution.text.TextBuilder.TextBuilder
TextBuilder()
Definition: TextBuilder.java:57
javolution.text.TextBuilder.equals
final boolean equals(Object obj)
Definition: TextBuilder.java:833
javolution.text.Text.valueOf
static Text valueOf(Object obj)
Definition: Text.java:140
javolution.text.TextBuilder.append
final TextBuilder append(char c)
Definition: TextBuilder.java:202
javolution.lang.MathLib
Definition: MathLib.java:20
javolution.text.Text
Definition: Text.java:62
javolution.text.TextBuilder.append
final TextBuilder append(CharSequence csq, int start, int end)
Definition: TextBuilder.java:246
javolution.text.TextBuilder
Definition: TextBuilder.java:29
javolution.text.TextBuilder.clear
final TextBuilder clear()
Definition: TextBuilder.java:725
javolution.text.TextBuilder.toString
final String toString()
Definition: TextBuilder.java:780
javolution.text.TextBuilder.toLargeString
String toLargeString()
Definition: TextBuilder.java:784
javolution.text.TextBuilder.subSequence
final java.lang.CharSequence subSequence(int start, int end)
Definition: TextBuilder.java:190
javolution.text.TextBuilder.append
final TextBuilder append(int i)
Definition: TextBuilder.java:407
javolution.text.TextBuilder.appendPositive
void appendPositive(int l1, int radix)
Definition: TextBuilder.java:454
javolution.text.TextBuilder.POW10_LONG
static final long[] POW10_LONG
Definition: TextBuilder.java:686
javolution.text.TextBuilder.toText
final Text toText()
Definition: TextBuilder.java:769
javolution.text.TextBuilder.DIGIT_TO_CHAR
static final char[] DIGIT_TO_CHAR
Definition: TextBuilder.java:475
javolution.text.TextBuilder.appendPositive
void appendPositive(long l1, int radix)
Definition: TextBuilder.java:530
javolution.text.TextBuilder.append
final TextBuilder append(String str)
Definition: TextBuilder.java:266
javolution.text.TextBuilder.TextBuilder
TextBuilder(String str)
Definition: TextBuilder.java:67
javolution.text.TextBuilder.append
final TextBuilder append(float f)
Definition: TextBuilder.java:557
javolution.text.TextBuilder.append
final TextBuilder append(Text txt)
Definition: TextBuilder.java:311
javolution.text.TextBuilder.append
final TextBuilder append(double d)
Definition: TextBuilder.java:572
javolution.text.TextBuilder.append
final TextBuilder append(long l)
Definition: TextBuilder.java:487
javolution.text.TextBuilder.append
final TextBuilder append(long l, int radix)
Definition: TextBuilder.java:513
javolution.text.TextBuilder.toCharArray
final CharArray toCharArray()
Definition: TextBuilder.java:796
javolution.text.TextBuilder.reverse
final TextBuilder reverse()
Definition: TextBuilder.java:754
javolution.lang.MathLib.floorLog10
static int floorLog10(double d)
Definition: MathLib.java:549
javolution.text.TextBuilder.append
final TextBuilder append(String str, int start, int end)
Definition: TextBuilder.java:282
javolution.lang
Definition: Configurable.java:9
javolution.text.TextBuilder.TextBuilder
TextBuilder(int capacity)
Definition: TextBuilder.java:79
javolution.text.TextBuilder.length
final int length()
Definition: TextBuilder.java:91
javolution.lang.MathLib.digitLength
static int digitLength(int i)
Definition: MathLib.java:161
javolution.text.TextBuilder.append
final TextBuilder append(char chars[], int offset, int length)
Definition: TextBuilder.java:368
javolution.text.TextBuilder.serialVersionUID
static final long serialVersionUID
Definition: TextBuilder.java:31
javolution.text.TextBuilder._high
char[][] _high
Definition: TextBuilder.java:42
javolution.lang.MathLib.toLongPow10
static long toLongPow10(double d, int n)
Definition: MathLib.java:400
javolution.text.TextBuilder.setLength
final void setLength(int newLength, char fillChar)
Definition: TextBuilder.java:169
javolution.lang.MathLib.toDoublePow10
static double toDoublePow10(long m, int n)
Definition: MathLib.java:240
javolution.text.TextBuilder.increaseCapacity
void increaseCapacity()
Definition: TextBuilder.java:870
javolution.text.TextBuilder.getChars
final void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
Definition: TextBuilder.java:121
javolution.text.Text.getChars
void getChars(int start, int end, char dest[], int destPos)
Definition: Text.java:1022
javolution.text.TextBuilder.appendFraction
void appendFraction(long l, int digits, boolean showZero)
Definition: TextBuilder.java:664
javolution.text.TextFormat.format
abstract Appendable format(T obj, Appendable dest)
javolution.text.TextBuilder.C1
static final int C1
Definition: TextBuilder.java:37
javolution.text.TextBuilder.append
final TextBuilder append(char chars[])
Definition: TextBuilder.java:353
javolution.lang.MathLib.abs
static int abs(int i)
Definition: MathLib.java:921
javolution.text.TextBuilder.setCharAt
final void setCharAt(int index, char c)
Definition: TextBuilder.java:143
javolution.text.TextBuilder.contentEquals
final boolean contentEquals(java.lang.CharSequence csq)
Definition: TextBuilder.java:856
javolution.text.TextFormat
Definition: TextFormat.java:52
javolution.text.TextBuilder.B0
static final int B0
Definition: TextBuilder.java:34
javolution.text.TextBuilder.charAt
final char charAt(int index)
Definition: TextBuilder.java:103
javolution.text.CharArray.setArray
CharArray setArray(char[] array, int offset, int length)
Definition: CharArray.java:116
javolution.text.TextBuilder.append
final TextBuilder append(double d, int digits, boolean scientific, boolean showZero)
Definition: TextBuilder.java:592
javolution.text.TextBuilder._low
char[] _low
Definition: TextBuilder.java:40
javolution.text.TextBuilder.hashCode
final int hashCode()
Definition: TextBuilder.java:815
javolution.text.TextBuilder._length
int _length
Definition: TextBuilder.java:47
javolution.text.TextBuilder.setLength
final void setLength(int newLength)
Definition: TextBuilder.java:156
javolution.lang.MathLib.min
static int min(int x, int y)
Definition: MathLib.java:1010
javolution.text.TextContext
Definition: TextContext.java:49
javolution.text.TextBuilder.M1
static final int M1
Definition: TextBuilder.java:38
javolution.text.TextBuilder.append
final TextBuilder append(boolean b)
Definition: TextBuilder.java:396
javolution.text.TextBuilder.append
final TextBuilder append(Object obj)
Definition: TextBuilder.java:215