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

com.as.text_understanding.common.TextUnderstandingUtilities Maven / Gradle / Ivy

The newest version!
package com.as.text_understanding.common;

import java.util.Collections;

/**
 * Common utility functions for this project.
 * 
 * 
 * 

* Date: 28 February 2016 * @author Asher Stern * */ public class TextUnderstandingUtilities { /** * The output of this method is its input, unless the input is null, for * which the function returns an empty Iterable. *
* Used to shorten code like for (X x : I), such that it will * not be required to check for null before the loop. * * @param originalIterable * @return */ public static Iterable each(Iterable originalIterable) { if (originalIterable==null) { return Collections.emptyList(); } else { return originalIterable; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy