org.coode.oppl.utils.Position Maven / Gradle / Ivy
package org.coode.oppl.utils;
import static org.coode.oppl.utils.ArgCheck.checkNotNull;
import java.util.Collections;
import java.util.List;
import org.semanticweb.owlapi.model.OWLObject;
/** @author Luigi Iannone */
public class Position {
/** empty position */
public final static List EMPTY_POSITION = Collections.singletonList(-1);
private final static OWLObjectDecomposer DECOMPOSER = new OWLObjectDecomposer();
/** @param owlObject
* owlObject
* @param position
* position
* @return found object, or null */
public static Object get(OWLObject owlObject, List position) {
checkNotNull(owlObject, "owlObject");
checkNotNull(position, "position");
Object toReturn = owlObject;
if (!position.isEmpty()) {
Integer index = position.get(0);
List