1 25 38 package org.jgrapht.experimental.isomorphism; 39 40 import org.jgrapht.*; 41 42 43 53 public class IntegerVertexFactory 54 implements VertexFactory<Integer > 55 { 56 57 59 private int counter; 60 61 63 69 public IntegerVertexFactory() 70 { 71 this(0); 72 } 73 74 public IntegerVertexFactory(int oneBeforeFirstValue) 75 { 76 this.counter = oneBeforeFirstValue; 77 } 78 79 81 public Integer createVertex() 82 { 83 this.counter++; 84 return new Integer (this.counter); 85 } 86 } 87 | Popular Tags |