dk.brics.string.stringoperations
Class AssertStartsWith

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

public class AssertStartsWith
extends BinaryOperation

Asserts that the second string is a prefix of the first string. This is the mirror of AssertPrefixOf.

Author:
Asger

Constructor Summary
AssertStartsWith()
           
 
Method Summary
 CharSet charsetTransfer(CharSet a1, CharSet a2)
          Transfer function for character set analysis.
 int getPriority()
          Returns priority of this operation.
 boolean isAssertion()
          Returns whether this operation is an assertion.
 Automaton op(Automaton a1, Automaton a2)
          Binary operation on automata.
 String toString()
          Returns name of this operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AssertStartsWith

public AssertStartsWith()
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

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

isAssertion

public boolean isAssertion()
Description copied from class: BinaryOperation
Returns whether this operation is an assertion. By default, this returns false.

This is used when breaking operation cycles in the grammar.

Overrides:
isAssertion in class BinaryOperation

op

public Automaton op(Automaton a1,
                    Automaton a2)
Description copied from class: BinaryOperation
Binary operation on automata.

Specified by:
op in class BinaryOperation
Parameters:
a1 - first input automaton, should not be modified
a2 - second input automaton, should not be modified
Returns:
output 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.