本文整理匯總了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());
}