| Line | Hits | Source |
|---|---|---|
| 1 | /* | |
| 2 | * Copyright (c) 2003, the JUNG Project and the Regents of the University | |
| 3 | * of California | |
| 4 | * All rights reserved. | |
| 5 | * | |
| 6 | * This software is open-source under the BSD license; see either | |
| 7 | * "license.txt" or | |
| 8 | * http://jung.sourceforge.net/license.txt for a description. | |
| 9 | */ | |
| 10 | package edu.uci.ics.jung.graph.filters; | |
| 11 | ||
| 12 | import edu.uci.ics.jung.graph.Vertex; | |
| 13 | ||
| 14 | /** | |
| 15 | * A small filter that returns the vertices and edges in the orignal Graph. | |
| 16 | * @author danyelf | |
| 17 | */ | |
| 18 | public class TrivialFilter extends GeneralVertexAcceptFilter implements EfficientFilter { | |
| 19 | ||
| 20 | /** | |
| 21 | * Returns true for all vertices. | |
| 22 | */ | |
| 23 | public boolean acceptVertex(Vertex vert) { | |
| 24 | 9 | return true; |
| 25 | } | |
| 26 | ||
| 27 | public String getName() { | |
| 28 | 4 | return "(Trivial)"; |
| 29 | } | |
| 30 | ||
| 31 | 2 | static private TrivialFilter instance = null; |
| 32 | ||
| 33 | /** | |
| 34 | * This is a factory class; just ask for an instance of | |
| 35 | * this one. | |
| 36 | */ | |
| 37 | public static TrivialFilter getInstance() { | |
| 38 | 4 | if (instance == null) { |
| 39 | 2 | instance = new TrivialFilter(); |
| 40 | } | |
| 41 | 4 | return instance; |
| 42 | } | |
| 43 | ||
| 44 | 2 | protected TrivialFilter() { |
| 45 | 2 | } |
| 46 | ||
| 47 | } |
|
this report was generated by version 1.0.5 of jcoverage. |
copyright © 2003, jcoverage ltd. all rights reserved. |