edu.rice.cs.drjava.model.definitions.reducedmodel
Class BraceInfo

java.lang.Object
  extended by edu.rice.cs.drjava.model.definitions.reducedmodel.BraceInfo

public class BraceInfo
extends Object

Indent information block.

Version:
$Id: BraceInfo.java 5175 2010-01-20 08:46:32Z mgricken $

Field Summary
private  String _braceType
           
private  int _distance
          distance to open brace preceding the anchor point (_currentLocation or beginning of line).
static String NONE
           
static BraceInfo NULL
           
static String OPEN_BRACKET
           
static String OPEN_CURLY
           
static String OPEN_PAREN
           
 
Constructor Summary
BraceInfo(String braceType, int distance)
          Creates an IndentInfo with default values.
 
Method Summary
 String braceType()
          Gets the _braceType.
 int distance()
          Gets the _distance.
 BraceInfo shift(int dist)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final String NONE
See Also:
Constant Field Values

OPEN_CURLY

public static final String OPEN_CURLY
See Also:
Constant Field Values

OPEN_PAREN

public static final String OPEN_PAREN
See Also:
Constant Field Values

OPEN_BRACKET

public static final String OPEN_BRACKET
See Also:
Constant Field Values

NULL

public static final BraceInfo NULL

_braceType

private String _braceType

_distance

private int _distance
distance to open brace preceding the anchor point (_currentLocation or beginning of line). Distance includes brace so that (anchor - distance) gives offset of brace.

Constructor Detail

BraceInfo

public BraceInfo(String braceType,
                 int distance)
Creates an IndentInfo with default values.

Method Detail

braceType

public String braceType()
Gets the _braceType.


distance

public int distance()
Gets the _distance.


shift

public BraceInfo shift(int dist)
Returns:
a new BraceInfo equivalent to this except that this.distance is shifted by dist. NONE is treated as a special case.

toString

public String toString()
Overrides:
toString in class Object