当前位置: 首页>>代码示例>>Java>>正文


Java SetUniqueList类代码示例

本文整理汇总了Java中org.apache.commons.collections4.list.SetUniqueList的典型用法代码示例。如果您正苦于以下问题:Java SetUniqueList类的具体用法?Java SetUniqueList怎么用?Java SetUniqueList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SetUniqueList类属于org.apache.commons.collections4.list包,在下文中一共展示了SetUniqueList类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doInBackground

import org.apache.commons.collections4.list.SetUniqueList; //导入依赖的package包/类
@Override
protected Collection<Cancao> doInBackground() throws Exception {
	verificarSeExemploFoiDefinido();

	logger.info("Consultando canções com base em exemplo: {}", exemplo);
	List<Cancao> cancoes = new ArrayList<>();
	List<Cancao> cancoesUniqueList = SetUniqueList.setUniqueList(cancoes);

	logger.debug("Consultando no repositório local");
	cancoesUniqueList.addAll(repositorio.consultarPor(exemplo));

	logger.debug("Consultando na web");
	cancoesUniqueList.addAll(cancaoWs.consultarPor(exemplo));

	logger.debug("Ordenando canções");
	cancoes.sort(new CancoesPorTituloComparator());

	return cancoesUniqueList;
}
 
开发者ID:Ryudo302,项目名称:mychart,代码行数:20,代码来源:ConsultarCancoesWorker.java

示例2: doInBackground

import org.apache.commons.collections4.list.SetUniqueList; //导入依赖的package包/类
@Override
protected Collection<Artista> doInBackground() throws Exception {
	verificarSeExemploFoiDefinido();

	logger.info("Consultando artistas com base em exemplo: {}", exemplo);
	List<Artista> artistas = new ArrayList<>();
	List<Artista> artistasUniqueList = SetUniqueList.setUniqueList(artistas);

	logger.debug("Consultando no repositório local");
	Collection<Artista> artistasLocais = repositorio.consultarPor(exemplo);
	artistasLocais.forEach(artista -> artista.setPersistente(true));
	artistasUniqueList.addAll(artistasLocais);

	logger.debug("Consultando na web");
	artistasUniqueList.addAll(artistaWs.consultarPor(exemplo));

	logger.debug("Ordenando artistas");
	artistas.sort(new ArtistasPorNomeComparator());

	return artistasUniqueList;
}
 
开发者ID:Ryudo302,项目名称:mychart,代码行数:22,代码来源:ConsultarArtistasWorker.java

示例3: selectRuleTexts

import org.apache.commons.collections4.list.SetUniqueList; //导入依赖的package包/类
@Override
public List<String> selectRuleTexts(List<Integer> filterIds, boolean useCosmetics) {
    //noinspection unchecked
    List<String> rules = SetUniqueList.setUniqueList(new ArrayList<String>());

    for (int filterId : filterIds) {
        addRules(filterId, rules, useCosmetics);
    }

    return rules;
}
 
开发者ID:AdguardTeam,项目名称:ContentBlocker,代码行数:12,代码来源:FilterRuleDaoImpl.java

示例4: getAuthRealms

import org.apache.commons.collections4.list.SetUniqueList; //导入依赖的package包/类
public List<String> getAuthRealms() {
    List<String> sortable = new ArrayList<>();
    List<String> available = SetUniqueList.setUniqueList(sortable);
    auth.entrySet().forEach(entitlement -> {
        available.addAll(entitlement.getValue());
    });
    Collections.sort(sortable);
    return sortable;
}
 
开发者ID:apache,项目名称:syncope,代码行数:10,代码来源:SyncopeConsoleSession.java

示例5: add

import org.apache.commons.collections4.list.SetUniqueList; //导入依赖的package包/类
@Override
public void add(final int index, final V element) {
    if (keepUniqueElements) {
        SetUniqueList.setUniqueList(getList()).add(index, element);
    } else {
        getList().add(index, element);
    }
}
 
开发者ID:ZupCat,项目名称:simple-datastore,代码行数:9,代码来源:ListProperty.java

示例6: getSet

import org.apache.commons.collections4.list.SetUniqueList; //导入依赖的package包/类
private SetUniqueList<String> getSet(final Map<String, SetUniqueList<String>> map, final String attr)
{
	if (!map.containsKey(attr))
	{
		map.put(attr, SetUniqueList.setUniqueList(new LinkedList<>()));
	}
	return map.get(attr);
}
 
开发者ID:marekasf,项目名称:raml-validation-proxy,代码行数:9,代码来源:Collector.java

示例7: addValue

import org.apache.commons.collections4.list.SetUniqueList; //导入依赖的package包/类
private void addValue(final Map map, final String attr, final String... val)
{
	if (!map.containsKey(attr))
	{
		map.put(attr, SetUniqueList.setUniqueList(new LinkedList<>()));
	}
	Arrays.stream(val).filter(Objects::nonNull).forEach(v -> ((List) map.get(attr)).add(v.trim()));
}
 
开发者ID:marekasf,项目名称:raml-validation-proxy,代码行数:9,代码来源:RamlParser.java

示例8: Buffer

import org.apache.commons.collections4.list.SetUniqueList; //导入依赖的package包/类
/**
 * Creates a new buffer
 */
private Buffer() {
    targets = SetUniqueList.setUniqueList(new ArrayList<>());
    counts = new ArrayList<>();
}
 
开发者ID:broadinstitute,项目名称:gatk-protected,代码行数:8,代码来源:ReadCountCollectionUtils.java

示例9: addAll

import org.apache.commons.collections4.list.SetUniqueList; //导入依赖的package包/类
@Override
public boolean addAll(final Collection<? extends V> c) {
    return keepUniqueElements ? SetUniqueList.setUniqueList(getList()).addAll(c) : getList().addAll(c);
}
 
开发者ID:ZupCat,项目名称:simple-datastore,代码行数:5,代码来源:ListProperty.java

示例10: retainAll

import org.apache.commons.collections4.list.SetUniqueList; //导入依赖的package包/类
@Override
public boolean retainAll(final Collection<?> c) {
    return keepUniqueElements ? SetUniqueList.setUniqueList(getList()).retainAll(c) : getList().retainAll(c);
}
 
开发者ID:ZupCat,项目名称:simple-datastore,代码行数:5,代码来源:ListProperty.java

示例11: set

import org.apache.commons.collections4.list.SetUniqueList; //导入依赖的package包/类
@Override
public V set(final int index, final V element) {
    return keepUniqueElements ? SetUniqueList.setUniqueList(getList()).set(index, element) : getList().set(index, element);
}
 
开发者ID:ZupCat,项目名称:simple-datastore,代码行数:5,代码来源:ListProperty.java

示例12: setUniqueList

import org.apache.commons.collections4.list.SetUniqueList; //导入依赖的package包/类
/**
 * 队列内元素唯一的List, 内部集成了一个HashSet来实现.
 * 
 * @param list
 *            被包裹的底层List,可先定义ArrayList的初始长度等.
 */
public static <E> SetUniqueList<E> setUniqueList(final List<E> list) {
	return SetUniqueList.setUniqueList(list);
}
 
开发者ID:zhangjunfang,项目名称:util,代码行数:10,代码来源:CommonCollections.java

示例13: getTargets

import org.apache.commons.collections4.list.SetUniqueList; //导入依赖的package包/类
/**
 * Returns a live modifiable unique list to the targets already in the buffer.
 *
 * @return never {@code null}.
 */
private SetUniqueList<Target> getTargets() {
    return targets;
}
 
开发者ID:broadinstitute,项目名称:gatk-protected,代码行数:9,代码来源:ReadCountCollectionUtils.java


注:本文中的org.apache.commons.collections4.list.SetUniqueList类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。