本文整理了Java中org.eclipse.collections.api.set.MutableSet.collect()
方法的一些代码示例,展示了MutableSet.collect()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MutableSet.collect()
方法的具体详情如下:
包路径:org.eclipse.collections.api.set.MutableSet
类名称:MutableSet
方法名:collect
暂无
代码示例来源:origin: eclipse/eclipse-collections
@Override
public <V> MutableSet<V> collect(Function<? super T, ? extends V> function)
{
return this.getDelegate().collect(function);
}
代码示例来源:origin: eclipse/eclipse-collections
@Override
public <V> MutableSet<V> collect(Function<? super T, ? extends V> function)
{
return this.getMutableSet().collect(function);
}
代码示例来源:origin: eclipse/eclipse-collections
@Override
public <V> MutableSet<V> collect(Function<? super T, ? extends V> function)
{
return this.getDelegate().collect(function);
}
代码示例来源:origin: eclipse/eclipse-collections
@Override
public <V> MutableSet<V> collect(Function<? super T, ? extends V> function)
{
return this.getMutableSet().collect(function);
}
代码示例来源:origin: eclipse/eclipse-collections
/**
* Returns an Immutable version of powerset where the inner sets are also immutable.
*/
public static <T> ImmutableSet<ImmutableSet<T>> immutablePowerSet(Set<T> set)
{
return powerSet(set).collect(MutableSet::toImmutable).toImmutable();
}
代码示例来源:origin: eclipse/eclipse-collections
/**
* Returns an Immutable version of powerset where the inner sets are also immutable.
*/
public static <T> ImmutableSet<ImmutableSet<T>> immutablePowerSet(Set<T> set)
{
return powerSet(set).collect(MutableSet::toImmutable).toImmutable();
}
代码示例来源:origin: eclipse/eclipse-collections
@Override
public <V> MutableSet<V> collect(Function<? super T, ? extends V> function)
{
this.acquireReadLock();
try
{
return this.delegate.collect(function);
}
finally
{
this.unlockReadLock();
}
}
代码示例来源:origin: eclipse/eclipse-collections
@Override
public <V> MutableSet<V> collect(Function<? super T, ? extends V> function)
{
this.acquireReadLock();
try
{
return this.delegate.collect(function);
}
finally
{
this.unlockReadLock();
}
}
代码示例来源:origin: eclipse/eclipse-collections
private static <T> MutableSet<MutableSet<T>> powerSetWithSeed(Set<T> set, MutableSet<MutableSet<T>> seed)
{
return Iterate.injectInto(seed, set, (accumulator, element) -> SetIterables.union(accumulator, accumulator.collect(innerSet -> innerSet.clone().with(element))));
}
代码示例来源:origin: eclipse/eclipse-collections
private static <T> MutableSet<MutableSet<T>> powerSetWithSeed(Set<T> set, MutableSet<MutableSet<T>> seed)
{
return Iterate.injectInto(seed, set, (accumulator, element) -> SetIterables.union(accumulator, accumulator.collect(innerSet -> innerSet.clone().with(element))));
}
代码示例来源:origin: eclipse/eclipse-collections
public static <T> MutableSet<MutableSet<T>> powerSet(Set<T> set)
{
MutableSet<MutableSet<T>> seed = UnifiedSet.newSetWith(UnifiedSet.newSet());
return Iterate.injectInto(seed, set, (accumulator, element) -> Sets.union(accumulator, accumulator.collect(innerSet -> innerSet.toSet().with(element))));
}
代码示例来源:origin: eclipse/eclipse-collections
public static <T> MutableSet<MutableSet<T>> powerSet(Set<T> set)
{
MutableSet<MutableSet<T>> seed = UnifiedSet.newSetWith(UnifiedSet.newSet());
return Iterate.injectInto(seed, set, (accumulator, element) -> Sets.union(accumulator, accumulator.collect(innerSet -> innerSet.toSet().with(element))));
}
代码示例来源:origin: org.eclipse.collections/eclipse-collections
@Override
public <V> MutableSet<V> collect(Function<? super T, ? extends V> function)
{
return this.getMutableSet().collect(function);
}
代码示例来源:origin: org.eclipse.collections/eclipse-collections
@Override
public <V> MutableSet<V> collect(Function<? super T, ? extends V> function)
{
return this.getDelegate().collect(function);
}
代码示例来源:origin: org.eclipse.collections/eclipse-collections
/**
* Returns an Immutable version of powerset where the inner sets are also immutable.
*/
public static <T> ImmutableSet<ImmutableSet<T>> immutablePowerSet(Set<T> set)
{
return powerSet(set).collect(MutableSet::toImmutable).toImmutable();
}
代码示例来源:origin: goldmansachs/obevo
@Override
public boolean accept(File mainFile, RevEngDestination dbFileRep) {
return !mainFile.exists()
|| tableNames.collect(StringFunctions.toLowerCase()).contains(
dbFileRep.getObjectName().toLowerCase());
}
};
代码示例来源:origin: com.goldmansachs.obevo/obevo-core
public static <T, E> SetIterable<Pair<T, E>> getDependencyNodesAndEdges(final DirectedGraph<T, E> graph, T vertex) {
return SetAdapter.adapt(graph.incomingEdgesOf(vertex)).collect(new Function<E, Pair<T, E>>() {
@Override
public Pair<T, E> valueOf(E edge) {
return Tuples.pair(graph.getEdgeSource(edge), edge);
}
});
}
代码示例来源:origin: com.goldmansachs.obevo/obevo-core
public static <T> SetIterable<T> getDependentNodes(final DirectedGraph<T, DefaultEdge> graph, T vertex) {
return SetAdapter.adapt(graph.outgoingEdgesOf(vertex)).collect(new Function<DefaultEdge, T>() {
@Override
public T valueOf(DefaultEdge e) {
return graph.getEdgeTarget(e);
}
});
}
代码示例来源:origin: com.goldmansachs.obevo/obevo-db
@Override
public boolean accept(File mainFile, RevEngDestination dbFileRep) {
return !mainFile.exists()
|| tableNames.collect(StringFunctions.toLowerCase()).contains(
dbFileRep.getObjectName().toLowerCase());
}
};
代码示例来源:origin: goldmansachs/obevo
@Override
public boolean accept(Set<SortableDependency> each) {
return SetAdapter.adapt(each).collect(new Function<SortableDependency, String>() {
@Override
public String valueOf(SortableDependency sortableDependency) {
return sortableDependency.getChangeKey().getChangeName();
}
}).equals(cycleVertices);
}
});
内容来源于网络,如有侵权,请联系作者删除!