![JAR search and dependency download from the Maven repository](/logo.png)
com.as.text_understanding.common.TextUnderstandingUtilities Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of text-understanding Show documentation
Show all versions of text-understanding Show documentation
Analyzing natural-language text, in particular predicate-argument structure.
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