Package ca.cgjennings.layout
Class FastBreakIterator
- java.lang.Object
-
- java.text.BreakIterator
-
- ca.cgjennings.layout.FastBreakIterator
-
- All Implemented Interfaces:
java.lang.Cloneable
public final class FastBreakIterator extends java.text.BreakIterator
A break iterator that caches the breakpoints of another iterator. This is useful when performing text layout, as break point analysis is used heavily during this process.- Since:
- 2.0
- Author:
- Chris Jennings
-
-
Constructor Summary
Constructors Constructor Description FastBreakIterator(java.text.BreakIterator iteratorToCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
current()
int
first()
int
following(int offset)
java.text.CharacterIterator
getText()
int
last()
int
next()
int
next(int n)
int
preceding(int offset)
int
previous()
void
setText(java.text.CharacterIterator newText)
-
-
-
Method Detail
-
setText
public void setText(java.text.CharacterIterator newText)
- Specified by:
setText
in classjava.text.BreakIterator
-
getText
public java.text.CharacterIterator getText()
- Specified by:
getText
in classjava.text.BreakIterator
-
current
public int current()
- Specified by:
current
in classjava.text.BreakIterator
-
first
public int first()
- Specified by:
first
in classjava.text.BreakIterator
-
last
public int last()
- Specified by:
last
in classjava.text.BreakIterator
-
following
public int following(int offset)
- Specified by:
following
in classjava.text.BreakIterator
-
preceding
public int preceding(int offset)
- Overrides:
preceding
in classjava.text.BreakIterator
-
next
public int next(int n)
- Specified by:
next
in classjava.text.BreakIterator
-
next
public int next()
- Specified by:
next
in classjava.text.BreakIterator
-
previous
public int previous()
- Specified by:
previous
in classjava.text.BreakIterator
-
-