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.graphs.base.compact; 018 019/** 020 * An edge in a {@link CompactSimpleGraph}. 021 * 022 * @author Malte Isberner <malte.isberner@gmail.com> 023 * 024 * @param <EP> edge property class. 025 */ 026public class CompactEdge<EP> { 027 028 private final int target; 029 private EP property; 030 protected int outIndex; 031 032 033 public CompactEdge(int target, EP property) { 034 this.target = target; 035 this.property = property; 036 } 037 038 public EP getProperty() { 039 return property; 040 } 041 042 public void setProperty(EP property) { 043 this.property = property; 044 } 045 046 public int getTarget() { 047 return target; 048 } 049 050 @Override 051 public String toString() { 052 return String.valueOf(property); 053 } 054 055}