Top Description Fields Constructors Methods
uk.ac.ed.ph.snuggletex.internal

public final Class FrozenSlice

extends Object
Class Inheritance
Imports
uk.ac.ed.ph.snuggletex.tokens.Token

Represents a finished "segment" of text in the WorkingDocument. This represents the document after ALL text substitutions have been made so ought to be considered as representing a fixed block of text.

This is used to represent the block of text each parsed Token refers to.

Developer Note

At one point in LaTeXTokeniser, it is technically possible to have a FrozenSlice which may refer to text which could change, but this phenomenon is temporary.
Author
David McKain
Version
$Revision$

Field Summary

Modifier and TypeField and Description
public final WorkingDocument
public final int
public final int
private transient String

Constructor Summary

AccessConstructor and Description
public
FrozenSlice(WorkingDocument document, int startIndex, int endIndex)

Method Summary

Modifier and TypeMethod and Description
protected final void
public CharSequence
public WorkingDocument
public int
public int
public boolean
public FrozenSlice
rightOuterSpan(final FrozenSlice rightSlice)

public final boolean
sharesDocumentWith(final FrozenSlice otherSlice)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

documentback to summary
public final WorkingDocument document
endIndexback to summary
public final int endIndex
startIndexback to summary
public final int startIndex
stringRepresentationback to summary
private transient String stringRepresentation

Constructor Detail

FrozenSliceback to summary
public FrozenSlice(WorkingDocument document, int startIndex, int endIndex)

Method Detail

ensureSharesDocumentWithback to summary
protected final void ensureSharesDocumentWith(final FrozenSlice otherSlice)
extractback to summary
public CharSequence extract()
getDocumentback to summary
public WorkingDocument getDocument()
getEndIndexback to summary
public int getEndIndex()
getStartIndexback to summary
public int getStartIndex()
isWhitespaceback to summary
public boolean isWhitespace()
rightOuterSpanback to summary
public FrozenSlice rightOuterSpan(final FrozenSlice rightSlice)
sharesDocumentWithback to summary
public final boolean sharesDocumentWith(final FrozenSlice otherSlice)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override