本文整理汇总了Java中com.google.common.collect.FluentIterable.from方法的典型用法代码示例。如果您正苦于以下问题:Java FluentIterable.from方法的具体用法?Java FluentIterable.from怎么用?Java FluentIterable.from使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.common.collect.FluentIterable
的用法示例。
在下文中一共展示了FluentIterable.from方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: remove
import com.google.common.collect.FluentIterable; //导入方法依赖的package包/类
@Override
public void remove(final AccelerationId id) {
entryStore.remove(id);
final Optional<Acceleration> acceleration = accelerationStore.get(id);
if (acceleration.isPresent()) {
for (final Layout layout : AccelerationUtils.getAllLayouts(acceleration.get())) {
final Iterable<Materialization> materializations = FluentIterable
.from(AccelerationUtils.getAllMaterializations(materializationStore.get(layout.getId())));
for (final Materialization materialization : materializations) {
if (materialization.getState() == MaterializationState.DONE) {
dropMaterialization(materialization);
}
}
materializationStore.remove(layout.getId());
}
}
accelerationStore.remove(id);
}
示例2: findDuplicates
import com.google.common.collect.FluentIterable; //导入方法依赖的package包/类
public Collection<Node> findDuplicates() {
FluentIterable<Node> duplicates = FluentIterable.from(getConflictingChildren());
for (Node child : children) {
duplicates = duplicates.append(child.findDuplicates());
}
return duplicates.toList();
}
示例3: windowFunctions
import com.google.common.collect.FluentIterable; //导入方法依赖的package包/类
/**
* The window functions to test
*/
private FluentIterable<AliasedField> windowFunctions(){
return FluentIterable.from(Lists.newArrayList(
windowFunction(count()).build(),
windowFunction(count()).partitionBy(field("field1")).build(),
windowFunction(sum(field("field1"))).partitionBy(field("field2"),field("field3")).orderBy(field("field4")).build(),
windowFunction(max(field("field1"))).partitionBy(field("field2"),field("field3")).orderBy(field("field4").asc()).build(),
windowFunction(min(field("field1"))).partitionBy(field("field2"),field("field3")).orderBy(field("field4").desc(),field("field5")).build(),
windowFunction(min(field("field1"))).orderBy(field("field2")).build(),
select( windowFunction(min(field("field1"))).orderBy(field("field2")).build().as("window")).from(tableRef("srcTable")).asField()
));
}
示例4: attributes
import com.google.common.collect.FluentIterable; //导入方法依赖的package包/类
private FluentIterable<ValueAttribute> attributes() {
return FluentIterable.from(attributes);
}
示例5: fromResource
import com.google.common.collect.FluentIterable; //导入方法依赖的package包/类
@Override
public FluentIterable<Resource> fromResource(Resource resource) {
return FluentIterable.from(resource.resources());
}
示例6: getSomeNumbers
import com.google.common.collect.FluentIterable; //导入方法依赖的package包/类
private static FluentIterable<? extends Number> getSomeNumbers() {
return FluentIterable.from(ImmutableList.<Number>of());
}
示例7: getExtraneousGroups
import com.google.common.collect.FluentIterable; //导入方法依赖的package包/类
@Override
public Iterable<Group> getExtraneousGroups(DeviceId deviceId) {
// flatten and make iterator unmodifiable
return FluentIterable.from(
getExtraneousGroupIdTable(deviceId).values());
}
示例8: getExtraneousGroups
import com.google.common.collect.FluentIterable; //导入方法依赖的package包/类
@Override
public Iterable<Group> getExtraneousGroups(DeviceId deviceId) {
// flatten and make iterator unmodifiable
return FluentIterable.from(
getExtraneousGroupIdTable(deviceId).values());
}