org.devaki.nextobjects.ui.editor
Class DocPosition

java.lang.Object
  extended byorg.devaki.nextobjects.ui.editor.DocPosition

class DocPosition
extends java.lang.Object

A wrapper for a position in a document appropriate for storing in a collection.


Constructor Summary
DocPosition(int pPosition)
          Construct a DocPosition from the given offset into the document.
 
Method Summary
 DocPosition adjustPosition(int adjustment)
          Adjust this position.
 boolean equals(java.lang.Object obj)
          Two DocPositions are equal iff they have the same internal position.
(package private)  int getPosition()
          Get the position represented by this DocPosition
 java.lang.String toString()
          A string representation useful for debugging.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DocPosition

public DocPosition(int pPosition)
Construct a DocPosition from the given offset into the document.

Method Detail

getPosition

int getPosition()
Get the position represented by this DocPosition

Returns:
the position

adjustPosition

public DocPosition adjustPosition(int adjustment)
Adjust this position.

Parameters:
adjustment - amount to adjust this position.
Returns:
the DocPosition, adjusted properly.

equals

public final boolean equals(java.lang.Object obj)
Two DocPositions are equal iff they have the same internal position.

Parameters:
obj - the object
Returns:
if this DocPosition represents the same position as another.

toString

public java.lang.String toString()
A string representation useful for debugging.

Returns:
A string representing the position.


Copyright © 2002-2004 devaki.org. All Rights Reserved.