List of usage examples for java.util TreeSet addAll
public boolean addAll(Collection<? extends E> c)
From source file:org.fenixedu.academic.domain.degree.DegreeType.java
public TreeSet<CycleType> getOrderedCycleTypes() { TreeSet<CycleType> result = new TreeSet<CycleType>(CycleType.COMPARATOR_BY_LESS_WEIGHT); result.addAll(getCycleTypes()); return result; }
From source file:GIST.IzbirkomExtractor.AbbrList.java
/** * returns a pattern in the form \\(exp1|exp2|exp3)\|| * with all expansions/*from ww w . ja va 2 s. c o m*/ * @return */ public Pattern getExpansionsPattern() { if (expansionsPattern == null) { /* collect all unique expansions in a set */ TreeSet<String> expansionSet = new TreeSet<String>(); for (Abbreviation ar : abbrevs.values()) expansionSet.addAll(ar.getExpansions()); StringBuilder sb = new StringBuilder("\\s*\\b("); sb.append(StringUtils.join(expansionSet, '|')); sb.append(")\\b\\s*"); expansionsPattern = Pattern.compile(sb.toString()); } return expansionsPattern; }
From source file:org.eclipse.skalli.model.ext.maven.MavenModule.java
/** * @return an unmodifiable set of available artifact versions sorted according to {@link MavenVersionsGreatestFirstComparator}. *//* w w w .j a va2 s.co m*/ public SortedSet<String> getSortedVersions() { TreeSet<String> sortedVersions = new TreeSet<String>( new MavenVersionsComparator(MavenVersionsComparator.SortOrder.DESCENDING)); sortedVersions.addAll(getVersions()); return Collections.unmodifiableSortedSet(sortedVersions); }
From source file:de.metanome.algorithm_integration.ColumnConditionAnd.java
@Override @JsonIgnore/*from w w w .j av a 2s .c om*/ public TreeSet<ColumnIdentifier> getContainedColumns() { TreeSet<ColumnIdentifier> result = new TreeSet<>(); for (ColumnCondition subElement : this.columnValues) { result.addAll(subElement.getContainedColumns()); } return result; }
From source file:org.commonreality.object.delta.DeltaTracker.java
synchronized public Collection<String> getProperties() { TreeSet<String> rtn = new TreeSet<String>(_deltaProperties.keySet()); rtn.addAll(_actualObject.getProperties()); return rtn;/* w w w . ja v a2 s . c o m*/ }
From source file:com.jdom.word.playdough.android.AndroidGamePackResolver.java
@Override public SortedSet<String> getGamePackNames() { InputStream openRawResource = null; String gamePackList = ""; try {// w ww . j av a 2 s .c o m openRawResource = context.getResources().openRawResource(ID_OF_GAME_PACK_LIST); gamePackList = IOUtils.toString(openRawResource); } catch (IOException e) { e.printStackTrace(); } finally { IOUtils.closeQuietly(openRawResource); } String[] gamePacks = StringUtils.split(gamePackList, '\n'); TreeSet<String> treeSet = new TreeSet<String>(new Comparator<String>() { public int compare(String arg0, String arg1) { return new Integer(arg0).compareTo(new Integer(arg1)); } }); treeSet.addAll(Arrays.asList(gamePacks)); return treeSet; }
From source file:org.openlmis.order.service.OrderService.java
public Set<DateFormat> getAllDateFormats() { TreeSet<DateFormat> dateFormats = new TreeSet<>(); dateFormats.addAll(asList(DateFormat.values())); return dateFormats; }
From source file:org.eclipse.skalli.core.extension.people.CoreRoleProvider.java
@Override public SortedSet<Member> getMembers(Project project) { TreeSet<Member> result = new TreeSet<Member>(); if (project != null) { PeopleExtension ext = project.getExtension(PeopleExtension.class); if (ext == null) { return result; }//from www .j av a 2s . c om result.addAll(ext.getLeads()); result.addAll(ext.getMembers()); } return result; }
From source file:ubic.gemma.web.controller.common.HomePageController.java
/** * For the show-off graph that shows number of data sets per taxon. *///w ww.ja v a 2 s .c om public void getCountsForTaxonPieChart() { Map<Taxon, Long> unsortedEEsPerTaxon = expressionExperimentService.getPerTaxonCount(); /* * Sort taxa by count. */ TreeSet<Map.Entry<Taxon, Long>> eesPerTaxonValueSorted = new TreeSet<Map.Entry<Taxon, Long>>( new TaxonComparator()); eesPerTaxonValueSorted.addAll(unsortedEEsPerTaxon.entrySet()); long expressionExperimentCount = expressionExperimentService.countAll(); double groupBelow = 0.1; // if a taxon has less then this percent of total count, group into 'other' String googleData = encodeDataForGoogle(eesPerTaxonValueSorted.descendingSet(), expressionExperimentCount, groupBelow); List<String> googleLabelsColls = new ArrayList<String>(); boolean grouped = false; List<String> others = new ArrayList<String>(); for (Entry<Taxon, Long> entry : eesPerTaxonValueSorted.descendingSet()) { String tname = entry.getKey().getCommonName(); if (StringUtils.isBlank(tname)) tname = entry.getKey().getScientificName(); if (entry.getValue() == 0) continue; if (groupIntoOther(entry.getValue(), expressionExperimentCount, groupBelow)) { grouped = true; others.add(tname); } else { googleLabelsColls.add(tname); } } if (grouped) { googleLabelsColls.add(StringUtils.abbreviate(StringUtils.join(others, ", "), 50)); } String googleLabels = StringUtils.join(googleLabelsColls, '|'); mav.addObject("googleData", googleData); mav.addObject("googleLabels", googleLabels); }
From source file:org.eclipse.skalli.model.ext.scrum.internal.ScrumRoleProvider.java
@Override public SortedSet<Member> getMembers(Project project) { TreeSet<Member> result = new TreeSet<Member>(); if (project != null) { ScrumProjectExt ext = project.getExtension(ScrumProjectExt.class); if (ext == null) { return result; }/*w ww. ja va 2 s . co m*/ result.addAll(ext.getScrumMasters()); SortedSet<Member> set = ext.getProductOwners(); result.addAll(set); } return result; }