/*
 * Copyright (c) 2004-2017, by Alex Leigh.
 * All rights reserved.
 *
 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE
 * The copyright notice above does not evidence any
 * actual or intended publication of such source code.
 */

package lc.mecha.lang;

import java.util.Map;

public class OrphanableFutureResult<K, V> extends FutureResult<V> {
    private final K key;
    private final Map<K, FutureResult> map;

    public OrphanableFutureResult(final K key, final Map<K, FutureResult> map) {
        assert (key != null);
        assert (map != null);

        this.key = key;
        this.map = map;
    }

    public void abandon() {
        map.remove(key);
    }
}
