Module java.desktop

Class Segment

java.lang.Object
javax.swing.text.Segment
All Implemented Interfaces:
CharSequence, Cloneable, CharacterIterator

public class Segment extends Object implements Cloneable, CharacterIterator, CharSequence
A segment of a character array representing a fragment of text. It should be treated as immutable even though the array is directly accessible. This gives fast access to fragments of text without the overhead of copying around characters. This is effectively an unprotected String.

The Segment implements the java.text.CharacterIterator interface to support use with the i18n support without copying text into a string.