net.sf.staccatocommons.lang.Some Maven / Gradle / Ivy
/**
* Copyright (c) 2011, The Staccato-Commons Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*/
package net.sf.staccatocommons.lang;
import java.io.Serializable;
import java.util.Iterator;
import net.sf.staccatocommons.defs.Executable;
import net.sf.staccatocommons.defs.Thunk;
import net.sf.staccatocommons.iterators.thriter.Thriterators;
import net.sf.staccatocommons.lang.internal.ToString;
import net.sf.staccatocommons.lang.value.BasicEquals;
import net.sf.staccatocommons.restrictions.Conditionally;
import net.sf.staccatocommons.restrictions.check.NonNull;
import net.sf.staccatocommons.restrictions.value.Immutable;
import net.sf.staccatocommons.restrictions.value.Value;
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
/**
* A defined {@link Option}, that is, an option that holds a value.
*
* @author flbulgarelli
* @param
* @see Option
*/
@Value
@Conditionally({ Immutable.class, Serializable.class })
public final class Some extends Option {
private static final long serialVersionUID = 5981912873938772033L;
private static final Some> SOME_NULL = new Some
© 2015 - 2025 Weber Informatics LLC | Privacy Policy