All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jakarta.xml.ws.Holder Maven / Gradle / Ivy

There is a newer version: 11.0.0-M4
Show newest version
/*
 * Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Distribution License v. 1.0, which is available at
 * http://www.eclipse.org/org/documents/edl-v10.php.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

package jakarta.xml.ws;

import java.io.Serializable;

/**
 * Holds a value of type {@code T}.
 *
 * @param  Type of the value in the holder.
 * @since 1.6, JAX-WS 2.0
 */
public final class Holder implements Serializable {

    private static final long serialVersionUID = 2623699057546497185L;

    /**
     * The value contained in the holder.
     */
    public T value;

    /**
     * Creates a new holder with a {@code null} value.
     */
    public Holder() {
    }

    /**
     * Create a new holder with the specified value.
     *
     * @param value The value to be stored in the holder.
     */
    public Holder(T value) {
        this.value = value;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy