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

org.coode.patterns.locality.SigmaPlusSigmaMinus Maven / Gradle / Ivy

There is a newer version: 5.0.0
Show newest version
package org.coode.patterns.locality;

import java.util.AbstractCollection;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;

import org.semanticweb.owlapi.model.OWLEntity;

/** holder for the extra symbols, one to be added to the signature, one to stay
 * outside the signature */
public class SigmaPlusSigmaMinus extends AbstractCollection implements
        Collection {
    private final OWLEntity plus;
    private final OWLEntity minus;

    /** @param plus
     *            the new value contained in the signature
     * @param minus
     *            the new value not contained in the signature */
    public SigmaPlusSigmaMinus(OWLEntity plus, OWLEntity minus) {
        this.plus = plus;
        this.minus = minus;
    }

    @Override
    public Iterator iterator() {
        return Arrays.asList(plus, minus).iterator();
    }

    @Override
    public int size() {
        return 2;
    }

    /** @return plus entity */
    public OWLEntity getPlus() {
        return plus;
    }

    /** @return minus entity */
    public OWLEntity getMinus() {
        return minus;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy