本文整理了Java中javaslang.collection.List.ofAll()
方法的一些代码示例,展示了List.ofAll()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。List.ofAll()
方法的具体详情如下:
包路径:javaslang.collection.List
类名称:List
方法名:ofAll
暂无
代码示例来源:origin: org.immutables.javaslang/javaslang-encodings
@Encoding.Naming(value = "setIterable*")
@Encoding.Init
void setIterable(
final Iterable<T> elements)
{
this.list = List.ofAll(elements);
}
代码示例来源:origin: org.immutables.javaslang/javaslang-encodings
@Encoding.Naming(value = "setIterable*")
@Encoding.Init
void setIterable(
final Iterable<T> elements)
{
this.linear_seq = List.ofAll(elements);
}
代码示例来源:origin: org.immutables.javaslang/javaslang-encodings
@Encoding.Naming(value = "setIterable*")
@Encoding.Init
void setIterable(
final Iterable<T> elements)
{
this.stack = List.ofAll(elements);
}
代码示例来源:origin: com.io7m.smfj/io7m-smfj-core
public Builder setIterableAttributesInOrder(Iterable<SMFAttribute> elements) {
this.attributesInOrder_list = List.ofAll(elements);
return this;
}
代码示例来源:origin: com.io7m.smfj/com.io7m.smfj.core
public Builder setIterableAttributesInOrder(Iterable<SMFAttribute> elements) {
this.attributesInOrder_list = List.ofAll(elements);
return this;
}
代码示例来源:origin: dswarm/dswarm
private javaslang.collection.List<Tuple2<AttributePath, Optional<Boolean>>> createAttributePaths(final javaslang.collection.List<Tuple2<Attribute, Optional<Boolean>>> attributesList) throws DMPPersistenceException {
final List<Tuple2<AttributePath, Optional<Boolean>>> attributePaths = new ArrayList<>();
for (final Tuple2<Attribute, Optional<Boolean>> attributeTuple : attributesList) {
final Optional<AttributePath> optionalAttributePath = createAttributePath(attributeTuple._1);
if (optionalAttributePath.isPresent()) {
attributePaths.add(Tuple.of(optionalAttributePath.get(), attributeTuple._2));
}
}
return javaslang.collection.List.ofAll(attributePaths);
}
代码示例来源:origin: apache/servicemix-bundles
@Nullable
@Override
public Object convert(@Nullable Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
if (source instanceof List) {
return javaslang.collection.List.ofAll((Iterable<?>) source);
}
if (source instanceof java.util.Set) {
return LinkedHashSet.ofAll((Iterable<?>) source);
}
if (source instanceof java.util.Map) {
return LinkedHashMap.ofAll((java.util.Map<?, ?>) source);
}
return source;
}
};
代码示例来源:origin: dswarm/dswarm
return javaslang.collection.List.ofAll(attributes);
代码示例来源:origin: com.io7m.smfj/io7m-smfj-format-text
return List.ofAll(this.tokens);
} finally {
this.tokens.clear();
代码示例来源:origin: dswarm/dswarm
/**
* sort components re. their natural order (begin from the end, i.e., component without output components)
*
* @param components original components set
* @return
*/
private static javaslang.collection.List<Component> sortComponents(final Set<Component> components) {
final Optional<Component> optionalLastComponent = components.stream()
.filter(component -> {
final Set<Component> outputComponents = component.getOutputComponents();
return outputComponents == null || outputComponents.isEmpty();
})
.findFirst();
if (!optionalLastComponent.isPresent()) {
return javaslang.collection.List.ofAll(components);
}
final Component lastComponent = optionalLastComponent.get();
final javaslang.collection.List<Component> lastComponentList = javaslang.collection.List.of(lastComponent);
final javaslang.collection.Map<String, Component> componentMap = javaslang.collection.HashSet.ofAll(components)
.toMap(component -> Tuple.of(component.getUuid(), component));
final javaslang.collection.List<Component> emptyComponentList = javaslang.collection.List.empty();
return addComponents(lastComponentList, componentMap, emptyComponentList);
}
代码示例来源:origin: dswarm/dswarm
final javaslang.collection.List<Tuple2<javaslang.collection.List<String>, Optional<String>>> entityMappingOutputTuples = javaslang.collection.List.ofAll(mappingOutputs)
.filter(mappingOutputTuple -> mappingOutputTuple._1.isPresent())
代码示例来源:origin: dswarm/dswarm
final List<Tuple2<String, JsonNode>> finalTuplesList = javaslang.collection.List.ofAll(tuplesList)
.map(tuple -> javaslang.Tuple.of(tuple.v1(), tuple.v2()))
.toJavaList();
代码示例来源:origin: com.io7m.smfj/com.io7m.smfj.validation.main
List.ofAll(IOUtils.readLines(this.stream, StandardCharsets.UTF_8));
final SMFTLineReaderType reader =
SMFTLineReaderList.create(this.uri, lines, 1);
代码示例来源:origin: com.io7m.smfj/com.io7m.smfj.processing.main
return invalid(List.ofAll(errors));
代码示例来源:origin: com.io7m.smfj/com.io7m.smfj.processing.main
return invalid(List.ofAll(errors));
代码示例来源:origin: com.io7m.smfj/com.io7m.smfj.processing.main
List.empty(), m.header().attributesByName(), this.source);
if (!errors.isEmpty()) {
return invalid(List.ofAll(errors));
代码示例来源:origin: com.io7m.smfj/com.io7m.smfj.processing.main
return invalid(List.ofAll(errors));
内容来源于网络,如有侵权,请联系作者删除!