# com.bea.ide.sourceeditor.element
DefaultSourceElement.StickyRange Class

protected class DefaultSourceElement.StickyRange
extends `Object`

A StickyRange is a `Range``` object whose start and end offsets track modifications to the source document. If characters are inserted or removed, the offsets will shift to match the modifications, providing a useful means of tracking a particular block of text.

Hierarchy
  `Object`
  `DefaultSourceElement.StickyRange`

Enclosing class
  `DefaultSourceElement`

## Field Summary

`protected `Position`` | `_end` Position
`protected `Position`` | `_start` Position

## Constructor Summary

DefaultSourceElement.StickyRange(`ISourceModel` model, `Range` range)
DefaultSourceElement.StickyRange(`ISourceModel` model, int start, int end)

## Method Summary

`public int` | `getEnd`() Returns the fixed (non-adjusting) end offset (exclusive) of this StickyRange.
`public `Position`` | `getEndPosition`() Returns the sticky position corresponding to the end (exclusive) of this StickyRange.
`public `Range`` | `getRange`() Returns a fixed (non-adjusting) snapshot of the range corresponding to this StickyRange.
`public int` | `getStart`() Returns the fixed (non-adjusting) start offset (inclusive) of this StickyRange.
`public `Position`` | `getStartPosition`() Returns the sticky position corresponding to the start (inclusive) of this StickyRange.

Methods from class `java.lang.`Object``
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Detail

### _end

    protected Position _end

### _start

    protected Position _start

## Constructor Detail

### DefaultSourceElement.StickyRange

    public DefaultSourceElement.StickyRange(ISourceModel model,
                                            Range range)

### DefaultSourceElement.StickyRange

    public DefaultSourceElement.StickyRange(ISourceModel model,
                                            int start,
                                            int end)

## Method Detail

### getEnd() Method

    public int getEnd()

Returns the fixed (non-adjusting) end offset (exclusive) of this StickyRange.

### getEndPosition() Method

    public Position getEndPosition()

Returns the sticky position corresponding to the end (exclusive) of this StickyRange.

### getRange() Method

    public Range getRange()

Returns a fixed (non-adjusting) snapshot of the range corresponding to this StickyRange.

### getStart() Method

    public int getStart()

Returns the fixed (non-adjusting) start offset (inclusive) of this StickyRange.

### getStartPosition() Method

    public Position getStartPosition()

Returns the sticky position corresponding to the start (inclusive) of this StickyRange.