|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.drjava.model.definitions.reducedmodel.ReducedToken
edu.rice.cs.drjava.model.definitions.reducedmodel.Gap
class Gap
A subclass of ReducedToken that represents sequences of non-special characters.
| Field Summary | |
|---|---|
private int |
_size
|
| Fields inherited from interface edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedModelStates |
|---|
FREE, INSIDE_BLOCK_COMMENT, INSIDE_DOUBLE_QUOTE, INSIDE_LINE_COMMENT, INSIDE_SINGLE_QUOTE, STUTTER |
| Constructor Summary | |
|---|---|
Gap(int size,
ReducedModelState state)
Creates a new Gap. |
|
| Method Summary | |
|---|---|
void |
flip()
Blows up. |
int |
getSize()
Gets the size of this gap. |
String |
getType()
Gets the token type. |
void |
grow(int delta)
Increases the size of the gap. |
boolean |
isBlockCommentEnd()
Determines that this is not the end of a block comment. |
boolean |
isBlockCommentStart()
Determines that this is not the start of a block comment. |
boolean |
isClosed()
Determines that this is not closed. |
boolean |
isClosedBrace()
Determines that this is not a closed brace. |
boolean |
isDoubleEscape()
Determines that this is not a double escape. |
boolean |
isDoubleEscapeSequence()
Determines that this is not a double escape sequence. |
boolean |
isDoubleQuote()
Determines that this is not a ". |
boolean |
isEscapedDoubleQuote()
Determines that this is not a \". |
boolean |
isEscapedSingleQuote()
Determines that this is not a \'. |
boolean |
isGap()
Determines that this is a gap. |
boolean |
isLineComment()
Determines that this is not a line comment. |
boolean |
isMatch(Brace other)
Determines that this is not a match. |
boolean |
isMatchable()
Determines that this ReducedToken is not matchable (one of "{", "}", "(", ")", "[", "]") |
boolean |
isMultipleCharBrace()
Determines that this is not a multi-char brace. |
boolean |
isNewline()
Determines that this is not a newline. |
boolean |
isOpen()
Determines that this is not open. |
boolean |
isOpenBrace()
Determines that this is not an open brace. |
boolean |
isSingleQuote()
Determines that this is not a '. |
boolean |
isSlash()
Determines that this is not a /. |
boolean |
isStar()
Determines that this is not a *. |
void |
setType(String type)
Blows up. |
void |
shrink(int delta)
Decreases the size of the gap. |
String |
toString()
Converts a Brace to a String. |
| Methods inherited from class edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedToken |
|---|
getHighlightState, getState, isCommented, isCommentStart, isQuoted, isShadowed, setState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private volatile int _size
| Constructor Detail |
|---|
Gap(int size,
ReducedModelState state)
size - the size of the gapstate - the state of the reduced model| Method Detail |
|---|
public int getSize()
getSize in class ReducedTokenpublic String getType()
getType in class ReducedTokenpublic void setType(String type)
setType in class ReducedTokentype - the type to set to
RuntimeException - alwayspublic void flip()
flip in class ReducedTokenRuntimeException - alwayspublic void grow(int delta)
grow in class ReducedTokendelta - the amount by which the gap is augmented.public void shrink(int delta)
shrink in class ReducedTokendelta - the amount by which the gap is diminished.public String toString()
toString in class Objectpublic boolean isMultipleCharBrace()
isMultipleCharBrace in class ReducedTokenfalsepublic boolean isGap()
isGap in class ReducedTokentruepublic boolean isLineComment()
isLineComment in class ReducedTokenfalsepublic boolean isBlockCommentStart()
isBlockCommentStart in class ReducedTokenfalsepublic boolean isBlockCommentEnd()
isBlockCommentEnd in class ReducedTokenfalsepublic boolean isNewline()
isNewline in class ReducedTokenfalsepublic boolean isSlash()
isSlash in class ReducedTokenfalsepublic boolean isStar()
isStar in class ReducedTokenfalsepublic boolean isDoubleQuote()
isDoubleQuote in class ReducedTokenfalsepublic boolean isSingleQuote()
isSingleQuote in class ReducedTokenfalsepublic boolean isDoubleEscapeSequence()
isDoubleEscapeSequence in class ReducedTokenfalsepublic boolean isDoubleEscape()
isDoubleEscape in class ReducedTokenfalsepublic boolean isEscapedSingleQuote()
isEscapedSingleQuote in class ReducedTokenfalsepublic boolean isEscapedDoubleQuote()
isEscapedDoubleQuote in class ReducedTokenfalsepublic boolean isOpen()
isOpen in class ReducedTokenfalsepublic boolean isClosed()
isClosed in class ReducedTokenpublic boolean isMatch(Brace other)
isMatch in class ReducedTokenother - the token to compare to
falsepublic boolean isMatchable()
isMatchable in class ReducedTokenpublic boolean isOpenBrace()
isOpenBrace in class ReducedTokenpublic boolean isClosedBrace()
isClosedBrace in class ReducedToken
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||