Java Code Examples for org.eclipse.xtext.xbase.lib.IteratorExtensions#filter()

The following examples show how to use org.eclipse.xtext.xbase.lib.IteratorExtensions#filter() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BlockImpl.java    From n4js with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public Iterator<YieldExpression> getAllVoidYieldExpressions() {
	final Function1<YieldExpression, Boolean> _function = new Function1<YieldExpression, Boolean>() {
		public Boolean apply(final YieldExpression it) {
			Expression _expression = it.getExpression();
			return Boolean.valueOf((_expression == null));
		}
	};
	return IteratorExtensions.<YieldExpression>filter(this.getAllYieldExpressions(), _function);
}
 
Example 2
Source File: BlockImpl.java    From n4js with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public Iterator<YieldExpression> getAllNonVoidYieldExpressions() {
	final Function1<YieldExpression, Boolean> _function = new Function1<YieldExpression, Boolean>() {
		public Boolean apply(final YieldExpression it) {
			Expression _expression = it.getExpression();
			return Boolean.valueOf((_expression != null));
		}
	};
	return IteratorExtensions.<YieldExpression>filter(this.getAllYieldExpressions(), _function);
}
 
Example 3
Source File: BlockImpl.java    From n4js with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public Iterator<ReturnStatement> getAllNonVoidReturnStatements() {
	final Function1<ReturnStatement, Boolean> _function = new Function1<ReturnStatement, Boolean>() {
		public Boolean apply(final ReturnStatement it) {
			Expression _expression = it.getExpression();
			return Boolean.valueOf((_expression != null));
		}
	};
	return IteratorExtensions.<ReturnStatement>filter(this.getAllReturnStatements(), _function);
}
 
Example 4
Source File: BlockImpl.java    From n4js with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public Iterator<ReturnStatement> getAllVoidReturnStatements() {
	final Function1<ReturnStatement, Boolean> _function = new Function1<ReturnStatement, Boolean>() {
		public Boolean apply(final ReturnStatement it) {
			Expression _expression = it.getExpression();
			return Boolean.valueOf((_expression == null));
		}
	};
	return IteratorExtensions.<ReturnStatement>filter(this.getAllReturnStatements(), _function);
}