org.pcollections.ConsPStack Maven / Gradle / Ivy
/*
* Copyright (c) 2008 Harold Cooper. All rights reserved.
* Licensed under the MIT License.
* See LICENSE file in the project root for full license information.
*/
package org.pcollections;
import java.io.Serializable;
import java.util.AbstractSequentialList;
import java.util.Collection;
import java.util.Iterator;
import java.util.ListIterator;
/**
* A simple persistent stack of non-null values.
*
* This implementation is thread-safe (assuming Java's AbstractSequentialList is thread-safe),
* although its iterators may not be.
*
* @author harold
* @param
*/
public final class ConsPStack extends AbstractSequentialList
implements PStack, Serializable {
private static final long serialVersionUID = 1L;
//// STATIC FACTORY METHODS ////
private static final ConsPStack