Package dk.brics.string.stringoperations

Source Code of dk.brics.string.stringoperations.AssertInLanguage

package dk.brics.string.stringoperations;

import dk.brics.automaton.Automaton;
import dk.brics.string.charset.CharSet;

public class AssertInLanguage extends UnaryOperation {
 
  private Automaton automaton;
 
  public AssertInLanguage(Automaton automaton) {
    this.automaton = automaton;
  }
 
  @Override
  public CharSet charsetTransfer(CharSet a) {
    return a.intersection(new CharSet(automaton));
  }
 
  @Override
  public Automaton op(Automaton a) {
    return a.intersection(automaton);
  }
 
  @Override
  public int getPriority() {
    return 1;
  }
 
  @Override
  public String toString() {
    return "in[" + Basic.getName(automaton) + "]";
  }
 
  @Override
  public boolean isAssertion() {
    return true;
  }
 
}
TOP

Related Classes of dk.brics.string.stringoperations.AssertInLanguage

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.