001/* Copyright (C) 2013 TU Dortmund 002 * This file is part of AutomataLib, http://www.automatalib.net/. 003 * 004 * AutomataLib is free software; you can redistribute it and/or 005 * modify it under the terms of the GNU Lesser General Public 006 * License version 3.0 as published by the Free Software Foundation. 007 * 008 * AutomataLib is distributed in the hope that it will be useful, 009 * but WITHOUT ANY WARRANTY; without even the implied warranty of 010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 011 * Lesser General Public License for more details. 012 * 013 * You should have received a copy of the GNU Lesser General Public 014 * License along with AutomataLib; if not, see 015 * http://www.gnu.de/documents/lgpl.en.html. 016 */ 017package net.automatalib.automata.fsa.abstractimpl; 018 019import net.automatalib.automata.abstractimpl.AbstractMutableDeterministic; 020import net.automatalib.automata.dot.DOTPlottableAutomaton; 021import net.automatalib.automata.fsa.MutableDFA; 022 023public abstract class AbstractMutableDFA<S, I> extends 024 AbstractMutableDeterministic<S,I,S,Boolean,Void> implements MutableDFA<S, I>, DOTPlottableAutomaton<S, I, S> { 025 026 027 @Override 028 public boolean accepts(Iterable<I> input) { 029 return AbstractDFA.accepts(this, input); 030 } 031 032 @Override 033 public S addState(Boolean property) { 034 return AbstractMutableFSA.addState(this, property); 035 } 036 037 @Override 038 public Boolean computeSuffixOutput(Iterable<I> prefix, Iterable<I> suffix) { 039 return AbstractFSA.computeSuffixOutput(this, prefix, suffix); 040 } 041 042 @Override 043 public Boolean computeOutput(Iterable<I> input) { 044 return AbstractFSA.computeOutput(this, input); 045 } 046 047 @Override 048 public void setStateProperty(S state, Boolean property) { 049 AbstractMutableFSA.setStateProperty(this, state, property); 050 } 051 052 @Override 053 public void setTransitionProperty(S transition, Void property) { 054 AbstractMutableFSA.setTransitionProperty(this, transition, property); 055 } 056 057 @Override 058 public S createTransition(S successor, Void properties) { 059 return AbstractMutableFSA.createTransition(this, successor, properties); 060 } 061 062 @Override 063 public S copyTransition(S trans, S succ) { 064 return AbstractMutableFSA.copyTransition(this, trans, succ); 065 } 066 067 @Override 068 public Boolean getStateProperty(S state) { 069 return AbstractFSA.getStateProperty(this, state); 070 } 071 072 @Override 073 public Void getTransitionProperty(S transition) { 074 return AbstractFSA.getTransitionProperty(this, transition); 075 } 076 077 @Override 078 public S getSuccessor(S transition) { 079 return AbstractFSA.getSuccessor(this, transition); 080 } 081 082 @Override 083 public S addInitialState(boolean accepting) { 084 return AbstractMutableFSA.addInitialState(this, accepting); 085 } 086 087 @Override 088 public void flipAcceptance() { 089 AbstractMutableFSA.flipAcceptance(this); 090 } 091 092 093 094}