@Test public void optimize() { ObjectVersionGraph<String> graph = init(v1, v2); graph = graph.optimize(v2.revision).getGraph(); assertThat(graph.size()).isEqualTo(1); assertThat(graph.getTip().getRevision()).isEqualTo(v2.revision); }
public static <M> ObjectVersionGraph<M> init() { return new ObjectVersionGraph<M>(); }
ObjectVersionGraph extends AbstractVersionGraph<PropertyPath, Object, M, ObjectVersionGraph<M>, Builder<M>> { public static <M> ObjectVersionGraph<M> init() { return new ObjectVersionGraph<M>(); } }
ObjectVersionGraph extends AbstractVersionGraph<PropertyPath, Object, M, ObjectVersionGraph<M>, Builder<M>> { public static <M> ObjectVersionGraph<M> init() { return new ObjectVersionGraph<M>(); } private  ObjectVersionGraph(); private  ObjectVersionGraph(Builder<M> builder); }
ObjectVersionGraph extends AbstractVersionGraph<PropertyPath, Object, M, ObjectVersionGraph<M>, Builder<M>> { public static <M> ObjectVersionGraph<M> init() { return new ObjectVersionGraph<M>(); } private  ObjectVersionGraph(); private  ObjectVersionGraph(Builder<M> builder); static ObjectVersionGraph<M> init(); static ObjectVersionGraph<M> init(Version<PropertyPath, Object, M> version); static ObjectVersionGraph<M> init(Version<PropertyPath, Object, M> v1,
                                                 Version<PropertyPath, Object, M> v2, Version<PropertyPath, Object, M>... rest); static ObjectVersionGraph<M> init(Iterable<? extends Version<PropertyPath, Object, M>> versions); }
ObjectVersionGraph extends AbstractVersionGraph<PropertyPath, Object, M, ObjectVersionGraph<M>, Builder<M>> { public static <M> ObjectVersionGraph<M> init() { return new ObjectVersionGraph<M>(); } private  ObjectVersionGraph(); private  ObjectVersionGraph(Builder<M> builder); static ObjectVersionGraph<M> init(); static ObjectVersionGraph<M> init(Version<PropertyPath, Object, M> version); static ObjectVersionGraph<M> init(Version<PropertyPath, Object, M> v1,
                                                 Version<PropertyPath, Object, M> v2, Version<PropertyPath, Object, M>... rest); static ObjectVersionGraph<M> init(Iterable<? extends Version<PropertyPath, Object, M>> versions);  }