1 /*
2 * Copyright (c) 2003, The JUNG Authors
3 *
4 * All rights reserved.
5 *
6 * This software is open-source under the BSD license; see either
7 * "license.txt" or
8 * https://github.com/jrtom/jung/blob/master/LICENSE for a description.
9 */
10 /*
11 * Created on Apr 13, 2004
12 */
13 package edu.uci.ics.jung.visualization.decorators;
14
15 import com.google.common.base.Function;
16
17
18
19 /**
20 * Labels vertices by their toString. This class functions as a drop-in
21 * replacement for the default StringLabeller method. This class does not
22 * guarantee unique labels; or even consistent ones.
23 *
24 * @author danyelf
25 */
26 public class ToStringLabeller implements Function<Object, String> {
27
28 /**
29 * @return o.toString()
30 */
31 public String apply(Object o) {
32 return o.toString();
33 }
34
35 }