use of org.eclipse.xtext.xbase.lib.Functions.Function1 in project applause by applause.
the class DefaultDetailsScreenModuleFileCompiler method defaultCell.
public ScreenListItemCell defaultCell(final Screen it) {
EList<ScreenSection> _sections = it.getSections();
final Function1<ScreenSection, ScreenSectionItems> _function = new Function1<ScreenSection, ScreenSectionItems>() {
public ScreenSectionItems apply(final ScreenSection it) {
ScreenSectionItems _items = it.getItems();
return _items;
}
};
List<ScreenSectionItems> _map = ListExtensions.<ScreenSection, ScreenSectionItems>map(_sections, _function);
final Function1<ScreenSectionItems, EList<ScreenListItemCell>> _function_1 = new Function1<ScreenSectionItems, EList<ScreenListItemCell>>() {
public EList<ScreenListItemCell> apply(final ScreenSectionItems it) {
EList<ScreenListItemCell> _items = it.getItems();
return _items;
}
};
List<EList<ScreenListItemCell>> _map_1 = ListExtensions.<ScreenSectionItems, EList<ScreenListItemCell>>map(_map, _function_1);
Iterable<ScreenListItemCell> _flatten = Iterables.<ScreenListItemCell>concat(_map_1);
ScreenListItemCell _head = IterableExtensions.<ScreenListItemCell>head(_flatten);
return _head;
}
use of org.eclipse.xtext.xbase.lib.Functions.Function1 in project applause by applause.
the class EntityDataAccessExtensions method parameterList.
public String parameterList(final DataSourceAccessMethod it) {
EList<Parameter> _declaredParameters = it.getDeclaredParameters();
final Function1<Parameter, String> _function = new Function1<Parameter, String>() {
public String apply(final Parameter param) {
Type _type = param.getType();
String _typeName = EntityDataAccessExtensions.this._typeExtensions.typeName(_type);
String _plus = (_typeName + " *");
Type _type_1 = param.getType();
String _parameterName = EntityDataAccessExtensions.this.parameterName(_type_1);
String _plus_1 = (_plus + _parameterName);
return _plus_1;
}
};
List<String> _map = ListExtensions.<Parameter, String>map(_declaredParameters, _function);
String _join = IterableExtensions.join(_map, ", ");
return _join;
}
Aggregations