dk.brics.string.stringoperations
Class Insert

java.lang.Object
  extended by dk.brics.string.stringoperations.Operation
      extended by dk.brics.string.stringoperations.BinaryOperation
          extended by dk.brics.string.stringoperations.Insert

public class Insert
extends BinaryOperation

Automaton operation for StringBuffer.insert(int,Object) and related methods.


Constructor Summary
Insert()
          Constructs new operation object.
 
Method Summary
 CharSet charsetTransfer(CharSet a1, CharSet a2)
          Transfer function for character set analysis.
 boolean equals(Object obj)
           
 int getPriority()
          Returns priority of this operation.
 int hashCode()
           
 Automaton op(Automaton a, Automaton b)
          Automaton operation.
 String toString()
          Returns name of this operation.
 
Methods inherited from class dk.brics.string.stringoperations.BinaryOperation
isAssertion
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Insert

public Insert()
Constructs new operation object.

Method Detail

charsetTransfer

public CharSet charsetTransfer(CharSet a1,
                               CharSet a2)
Description copied from class: BinaryOperation
Transfer function for character set analysis.

Specified by:
charsetTransfer in class BinaryOperation

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getPriority

public int getPriority()
Description copied from class: Operation
Returns priority of this operation. When approximating operation loops in grammars, operations with high priority are considered first.

Specified by:
getPriority in class Operation

hashCode

public int hashCode()
Overrides:
hashCode in class Object

op

public Automaton op(Automaton a,
                    Automaton b)
Automaton operation. Constructs new automaton as two copies, a1 and a2, of a and one copy, b, of b. The initial state is the one from a1, the accept states are those in a2. Epsilon transitions are added from each state in a1 to the initial state in b and from each accept state in b to each state in a2.

Specified by:
op in class BinaryOperation
Parameters:
a - first input automaton
b - second input automaton
Returns:
resulting automaton

toString

public String toString()
Description copied from class: Operation
Returns name of this operation.

Specified by:
toString in class Operation


Copyright © 2003-2009 Anders Møller, Aske Simon Christensen, Asger Feldthaus.