Java tutorial
//package com.java2s; /* * TMQL4J - Javabased TMQL Engine * * Copyright: Copyright 2010 Topic Maps Lab, University of Leipzig. http://www.topicmapslab.de/ * License: Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.html * * @author Sven Krosse * @email krosse@informatik.uni-leipzig.de * */ import java.util.List; public class Main { /** * * Internal method to check if a tuple sequence contains sequences or only * atomic values. * * @param <E> * the type of contained items * @param sequence * the sequence * @return <code>true</code> if sequence has to atomfiy, <code>false</code> * otherwise */ private static <E extends Object> boolean hasToAtomify(List<E> sequence) { if (sequence.isEmpty()) { return false; } for (E obj : sequence) { if (obj instanceof List<?>) { return true; } } return false; } }