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.abstractimpl;
018
019import java.util.Iterator;
020
021import net.automatalib.automata.DeterministicAutomaton;
022import net.automatalib.automata.concepts.StateIDs;
023import net.automatalib.ts.abstractimpl.AbstractDTS;
024
025
026/**
027 * Abstract base class for deterministic automata.
028 * 
029 * @author Malte Isberner <malte.isberner@gmail.com>
030 *
031 * @param <S> state class
032 * @param <I> input symbol class
033 * @param <T> transition class
034 */
035public abstract class AbstractDeterministicAutomaton<S, I, T> extends AbstractDTS<S,I,T> implements
036                DeterministicAutomaton<S, I, T> {
037        
038        /*
039         * (non-Javadoc)
040         * @see net.automatalib.automata.simple.SimpleAutomaton#size()
041         */
042        @Override
043        public int size() {
044                return AbstractAutomaton.size(this);
045        }
046        
047        /*
048         * (non-Javadoc)
049         * @see java.lang.Iterable#iterator()
050         */
051        @Override
052        public Iterator<S> iterator() {
053                return AbstractAutomaton.iterator(this);
054        }
055        
056        /*
057         * (non-Javadoc)
058         * @see net.automatalib.automata.simple.SimpleAutomaton#stateIDs()
059         */
060        @Override
061        public StateIDs<S> stateIDs() {
062                return AbstractAutomaton.stateIDs(this);
063        }
064}