Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.InsertOperation Class Reference
Inheritance diagram for de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.InsertOperation:
de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.ITextOperation de.fu_berlin.inf.dpp.concurrent.jupiter.Operation

List of all members.

Public Member Functions

 InsertOperation (int position, String text)
 InsertOperation (int position, String text, int origin)
 InsertOperation (int position, String text, int origin, boolean isUndo)
int getPosition ()
String getText ()
int getTextLength ()
int getOrigin ()
String toString ()
boolean equals (Object obj)
int hashCode ()
List< TextEditActivitytoTextEdit (SPath path, User source)
List< ITextOperationgetTextOperations ()
ITextOperation invert ()

Detailed Description

The InsertOperation is used to hold a text together with its position index. The text is to be inserted in the document model.


Constructor & Destructor Documentation

de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.InsertOperation.InsertOperation ( int  position,
String  text 
)

Syntactic sugar for creating a new InsertOperation with the origin set to the given position.

Parameters:
positionthe position in the document
textthe text to be inserted
de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.InsertOperation.InsertOperation ( int  position,
String  text,
int  origin 
)
Parameters:
positionthe position in the document
textthe text to be inserted
originthe origin position of this insert operation
de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.InsertOperation.InsertOperation ( int  position,
String  text,
int  origin,
boolean  isUndo 
)
Parameters:
positionthe position in the document
textthe text to be inserted
originthe origin position of this insert operation
isUndoflag to indicate an undo operation

Member Function Documentation

boolean de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.InsertOperation.equals ( Object  obj)
int de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.InsertOperation.getOrigin ( )
Returns:
the origin position
int de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.InsertOperation.getPosition ( )
Returns:
the position of the text to be deleted / inserted

Implements de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.ITextOperation.

String de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.InsertOperation.getText ( )
Returns:
the text to be inserted

Implements de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.ITextOperation.

int de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.InsertOperation.getTextLength ( )
Returns:
the length of the text to be deleted / inserted

Implements de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.ITextOperation.

List<ITextOperation> de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.InsertOperation.getTextOperations ( )

Returns a list of all operations represented by this operation that perform text changes in the order they should be executed. This method can return an empty list (for NoOperations for instance).

Implements de.fu_berlin.inf.dpp.concurrent.jupiter.Operation.

int de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.InsertOperation.hashCode ( )
ITextOperation de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.InsertOperation.invert ( )

Returns:
the Operation that reverts the effect of this Operation if it is executed afterwards; e.g. if this is a DeleteOperation(5,"abc") the inverted Operation is InsertOperation(5,"abc")

Implements de.fu_berlin.inf.dpp.concurrent.jupiter.Operation.

String de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.InsertOperation.toString ( )
List<TextEditActivity> de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.InsertOperation.toTextEdit ( SPath  path,
User  source 
)

Returns a sequence of TextEditActivitys which represent this operation if applied in order to the editor denoted by the given path by the user identified by the given source.

Implements de.fu_berlin.inf.dpp.concurrent.jupiter.Operation.

 All Classes Namespaces Files Functions Variables Enumerations