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.util.minimizer;
018
019/**
020 * An edge in a {@link BlockAutomaton}.
021 * 
022 * @author Malte Isberner <malte.isberner@gmail.com>
023 *
024 * @param <S> state class.
025 * @param <L> transition label class.
026 */
027public class BlockEdge<S, L> {
028        private final Block<S,L> source;
029        private final Block<S,L> target;
030        private final L label;
031        
032        
033        /**
034         * Constructor.
035         * 
036         * @param source source block.
037         * @param target target block.
038         * @param label the transition label.
039         */
040        BlockEdge(Block<S,L> source, Block<S,L> target, L label) {
041                this.source = source;
042                this.target = target;
043                this.label = label;
044        }
045
046        /**
047         * Retrieves the source block.
048         * @return the source block.
049         */
050        public Block<S, L> getSource() {
051                return source;
052        }
053
054        /**
055         * Retrieves the target block.
056         * @return the target block.
057         */
058        public Block<S, L> getTarget() {
059                return target;
060        }
061
062        /**
063         * Retrieves the transition label.
064         * @return the transition label.
065         */
066        public L getLabel() {
067                return label;
068        }
069}