Update org.apache.commons:commons-compress to 1.25.0
[egit/eclipse.git] / org.eclipse.egit.ui / src / org / eclipse / egit / ui / internal / branch / ProjectTrackerMemento.java
blobc8e8d92c843bca4b22e88a6c13d834ae04be9ba2
1 /*******************************************************************************
2 * Copyright (C) 2018, Luís Copetti <lhcopetti@gmail.com>
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License 2.0
6 * which accompanies this distribution, and is available at
7 * https://www.eclipse.org/legal/epl-2.0/
9 * SPDX-License-Identifier: EPL-2.0
10 *******************************************************************************/
11 package org.eclipse.egit.ui.internal.branch;
13 import java.util.ArrayList;
14 import java.util.Collection;
16 /**
17 * An opaque class that can be retrieved by
18 * {@link BranchProjectTracker#snapshot()} and later saved by calling
19 * {@link BranchProjectTracker#save(ProjectTrackerMemento)}. For more
20 * information, look at the docs for {{@link BranchProjectTracker}
22 class ProjectTrackerMemento {
24 private final Collection<ProjectTrackerPreferenceSnapshot> snapshots = new ArrayList<>();
26 /**
27 * @param snapshot
29 void addSnapshot(ProjectTrackerPreferenceSnapshot snapshot) {
30 snapshots.add(snapshot);
33 /**
34 * @return the snapshot pairs previously added by
35 * {@link #addSnapshot(ProjectTrackerPreferenceSnapshot)}
37 Collection<ProjectTrackerPreferenceSnapshot> getSnapshots() {
38 return snapshots;