2 * Created on Jul 8, 2007
4 * Copyright (c) 2007, the JUNG Project and the Regents of the University
8 * This software is open-source under the BSD license; see either
10 * http://jung.sourceforge.net/license.txt for a description.
12 package edu.uci.ics.jung.algorithms.scoring.util;
15 * Convenience class for associating a vertex and an edge. Used, for example,
16 * in contexts in which it is necessary to know the origin for an edge traversal
17 * (that is, the direction in which an (undirected) edge is being traversed).
19 * @param <V> the vertex type
20 * @param <E> the edge type
22 public class VEPair<V, E>
28 * Creates an instance with the specified vertex and edge
29 * @param v the vertex to add
30 * @param e the edge to add
32 public VEPair(V v, E e)
34 if (v == null || e == null)
35 throw new IllegalArgumentException("elements must be non-null");
42 * Returns the vertex of this pair.
50 * Returns the edge of this pair.