API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing.text. Segment View Source
Author(s)
Timothy Prinzing
Since
Version
1.25 04/07/06
Serial
Hierarchy
 Object
      Segment
Implements
 Cloneable
 CharacterIterator
 CharSequence
Subclasses
Description
public class Segment
  A segment of a character array representing a fragment of text.
See also:   
Constructors
public Segment ()
Creates a new segment.
public Segment (char[] array, int offset, int count)
  Creates a new segment referring to an existing array.
Methods
Hide/Show inherited methods
public char charAt (int index) [Specified in CharSequence]
  Returns the char value at the specified index.
public Object clone () [Specified in CharacterIterator]
  Creates a shallow copy.
public char current () [Specified in CharacterIterator]
  Gets the character at the current position (as returned by getIndex()).
public char first () [Specified in CharacterIterator]
  Sets the position to getBeginIndex() and returns the character at that position.
public int getBeginIndex () [Specified in CharacterIterator]
  Returns the start index of the text.
public int getEndIndex () [Specified in CharacterIterator]
  Returns the end index of the text.
public int getIndex () [Specified in CharacterIterator]
  Returns the current index.
public boolean isPartialReturn ()
  Flag to indicate that partial returns are valid.
public char last () [Specified in CharacterIterator]
  Sets the position to getEndIndex()-1 (getEndIndex() if the text is empty) and returns the character at that position.
public int length () [Specified in CharSequence]
  Returns the length of this character sequence.
public char next () [Specified in CharacterIterator]
  Increments the iterator's index by one and returns the character at the new index.
public char previous () [Specified in CharacterIterator]
  Decrements the iterator's index by one and returns the character at the new index.
public char setIndex (int position) [Specified in CharacterIterator]
  Sets the position to the specified position in the text and returns that character.
public void setPartialReturn (boolean p)
  Flag to indicate that partial returns are valid.
public CharSequence subSequence (int start, int end) [Specified in CharSequence]
  Returns a new CharSequence that is a subsequence of this sequence.
public String toString () [Specified in CharSequence]
  Converts a segment into a String.
Fields
Hide/Show inherited fields
public char array
  This is the array containing the text of interest.
public int count
This is the number of array elements that make up the text of interest.
publicfinalstatic char DONE = "65535" [Inherited From CharacterIterator]
  Constant that is returned when the iterator has reached either the end or the beginning of the text.
public int offset
This is the offset into the array that the desired text begins.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar