Debian Codegraph @

bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Value.java

raw
1 /*******************************************************************************
2 * Copyright (c) 2012, 2017 Landmark Graphics Corporation and others
3 *
4 * 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/
8 *
9 * SPDX-License-Identifier: EPL-2.0
10 *
11 * Contributors:
12 * Landmark Graphics Corporation - initial API and implementation
13 * IBM Corporation - ongoing maintenance
14 *******************************************************************************/
15 package org.eclipse.equinox.p2.engine.spi;
16
17 /**
18 * An object that encapsulates the result of performing a provisioning action.
19 *
20 * @see ProvisioningAction#getResult()
21 * @since 2.3
22 */
23 public class Value<T> {
24 public static final Value<Object> NO_VALUE = new Value<>(null);
25 private T value;
26 private Class<T> clazz;
27
28 public Value(T val) {
29 value = val;
30 }
31
32 public T getValue() {
33 return value;
34 }
35
36 public Class<T> getClazz() {
37 return clazz;
38 }
39
40 }