comparison src/org/tmatesoft/hg/internal/RevisionSet.java @ 653:629a7370554c

Tests for recent changes in HgParentChildMap and RepositoryComparator (outgoing to respect drafts and Issue 47)
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 03 Jul 2013 14:38:30 +0200
parents cd77bf51b562
children
comparison
equal deleted inserted replaced
652:cd77bf51b562 653:629a7370554c
17 package org.tmatesoft.hg.internal; 17 package org.tmatesoft.hg.internal;
18 18
19 import static org.tmatesoft.hg.repo.HgRepository.NO_REVISION; 19 import static org.tmatesoft.hg.repo.HgRepository.NO_REVISION;
20 20
21 import java.util.ArrayList; 21 import java.util.ArrayList;
22 import java.util.Arrays;
22 import java.util.Collection; 23 import java.util.Collection;
23 import java.util.Collections; 24 import java.util.Collections;
24 import java.util.HashSet; 25 import java.util.HashSet;
25 import java.util.Iterator; 26 import java.util.Iterator;
26 import java.util.List; 27 import java.util.List;
38 * @author TMate Software Ltd. 39 * @author TMate Software Ltd.
39 */ 40 */
40 public final class RevisionSet implements Iterable<Nodeid> { 41 public final class RevisionSet implements Iterable<Nodeid> {
41 42
42 private final Set<Nodeid> elements; 43 private final Set<Nodeid> elements;
44
45 public RevisionSet(Nodeid... revisions) {
46 this(revisions == null ? null : Arrays.asList(revisions));
47 }
43 48
44 public RevisionSet(Collection<Nodeid> revisions) { 49 public RevisionSet(Collection<Nodeid> revisions) {
45 this(revisions == null ? new HashSet<Nodeid>() : new HashSet<Nodeid>(revisions)); 50 this(revisions == null ? new HashSet<Nodeid>() : new HashSet<Nodeid>(revisions));
46 } 51 }
47 52