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

List of all members.

Public Member Functions

 SplitOperation (Operation op1, Operation op2)
Operation getFirst ()
Operation getSecond ()
String toString ()
boolean equals (Object obj)
int hashCode ()
List< ITextOperationgetTextOperations ()
List< TextEditActivitytoTextEdit (SPath path, User source)
Operation invert ()

Protected Member Functions

ITextOperation combine (ITextOperation op1, ITextOperation op2)
boolean isReplace (Operation op1, Operation op2)

Protected Attributes

Operation op1
Operation op2

Detailed Description

The SplitOperation contains two operations to be performed after each other. It is used when an operation needs to be split up under certain transformation conditions.

See also:
Operation

Constructor & Destructor Documentation

de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.SplitOperation.SplitOperation ( Operation  op1,
Operation  op2 
)

Member Function Documentation

ITextOperation de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.SplitOperation.combine ( ITextOperation  op1,
ITextOperation  op2 
) [protected]
Returns:
a combined ITextOperation representing both op1 and op2 or null if the two operations cannot be combined
boolean de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.SplitOperation.equals ( Object  obj)
Operation de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.SplitOperation.getFirst ( )
Operation de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.SplitOperation.getSecond ( )
List<ITextOperation> de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.SplitOperation.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.SplitOperation.hashCode ( )
Operation de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.SplitOperation.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.

boolean de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.SplitOperation.isReplace ( Operation  op1,
Operation  op2 
) [protected]
Parameters:
op1
op2
Returns:
true if the combination of op1 and op2 describe a text replace
String de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.SplitOperation.toString ( )
List<TextEditActivity> de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.SplitOperation.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.


Member Data Documentation

 All Classes Namespaces Files Functions Variables Enumerations