blob: 8fcde201dd40fae4aa8afaedc10adf6ab8796165 [file] [log] [blame]
/*=============================================================================#
# Copyright (c) 2012, 2021 Stephan Wahlbrink and others.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
# which is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
#
# Contributors:
# Stephan Wahlbrink <sw@wahlbrink.eu> - initial API and implementation
#=============================================================================*/
package org.eclipse.statet.internal.r.core.pkgmanager;
import org.eclipse.statet.r.core.pkgmanager.IRPkgChangeSet;
import org.eclipse.statet.r.core.pkgmanager.IRPkgManager.Event;
import org.eclipse.statet.r.core.pkgmanager.IRPkgSet;
import org.eclipse.statet.rj.renv.core.REnv;
final class Change implements Event {
private final REnv rEnv;
final long stamp;
int repos;
int pkgs;
IRPkgSet oldPkgs;
IRPkgSet newPkgs;
RPkgChangeSet installedPkgs;
int views;
public Change(final REnv rEnv) {
this.rEnv= rEnv;
this.stamp= System.currentTimeMillis();
}
@Override
public REnv getREnv() {
return this.rEnv;
}
@Override
public int reposChanged() {
return this.repos;
}
@Override
public int pkgsChanged() {
return this.pkgs;
}
@Override
public IRPkgSet getOldPkgSet() {
return this.oldPkgs;
}
@Override
public IRPkgSet getNewPkgSet() {
return this.newPkgs;
}
@Override
public IRPkgChangeSet getInstalledPkgChangeSet() {
return this.installedPkgs;
}
@Override
public int viewsChanged() {
return this.views;
}
}