View Javadoc
1 /***
2 * LayeringEvent.java
3 *
4 * Project: Dependency Tool
5 *
6 * WHEN WHO WHAT
7 * 06.06.2003 pko initial public release
8 * 20.01.2003 pko creation
9 *
10 * Copyright 2003 ELCA Informatique SA
11 * Av. de la Harpe 22-24, 1000 Lausanne 13, Switzerland
12 * www.elca.ch
13 *
14 * This library is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Lesser General Public License
16 * as published by the Free Software Foundation; either version 2.1 of
17 * the License, or (at your option) any later version.
18 *
19 * This library is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Lesser General Public License for more details.
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with this library; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
27 * USA
28 */
29
30 package ch.elca.dependency.graph;
31
32 import att.grappa.Edge;
33
34 /***
35 * A <code>LayeringEvent</code> occurs each time an edge is discovered
36 * which violates the specified layering. In case of such a violation
37 * a <code>LayeringEvent</code> is fired and the registered
38 * LayeringListeners get an opportunity to process this Event accordingly.
39 *
40 * @author Pawel Kowalski
41 * @version 1.0-beta
42 */
43 public class LayeringEvent {
44
45 /***
46 * The Edge associated with this LayeringEvent.
47 */
48 private Edge m_edge = null;
49
50 /***
51 * Creates a new <code>LayeringEvent</code> instance.
52 *
53 * @param edge an <code>Edge</code> value
54 */
55 public LayeringEvent(Edge edge) {
56 m_edge = edge;
57 }
58
59 /***
60 * Get the Edge associated with this LayeringEvent.
61 *
62 * @return an <code>Edge</code> value
63 */
64 public Edge getEdge() {
65 return m_edge;
66 }
67
68 /***
69 * Get the String representation of this LayeringEvent
70 *
71 * @return a <code>String</code> value
72 */
73 public String toString() {
74 return (m_edge == null ? "null" : m_edge.getTail() + "->-" + m_edge.getHead());
75 }
76 }
This page was automatically generated by Maven