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
;
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
<>();
29 void addSnapshot(ProjectTrackerPreferenceSnapshot snapshot
) {
30 snapshots
.add(snapshot
);
34 * @return the snapshot pairs previously added by
35 * {@link #addSnapshot(ProjectTrackerPreferenceSnapshot)}
37 Collection
<ProjectTrackerPreferenceSnapshot
> getSnapshots() {