Example usage for java.util SortedSet addAll

List of usage examples for java.util SortedSet addAll

Introduction

In this page you can find the example usage for java.util SortedSet addAll.

Prototype

boolean addAll(Collection<? extends E> c);

Source Link

Document

Adds all of the elements in the specified collection to this set if they're not already present (optional operation).

Usage

From source file:org.kalypso.model.hydrology.internal.IDManager.java

public void dump(final Writer writer) throws IOException {
    final SortedSet<IDMap> sort = new TreeSet<>(IDMap.COMPARATOR);

    sort.addAll(m_idMapFeature.keySet());
    writer.write(String.format(Locale.US, "%-10s%-6s%-16s %-32s %-32s %-32s\n\n", "ASCII ID", "", "GML Type", //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
            "GML ID", "GML Name", "GML Description")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    for (final IDMap idmap : sort) {
        writer.write(String.format(Locale.US, "%-10s -->  ", idmap.toString())); //$NON-NLS-1$
        final Object value = m_idMapFeature.get(idmap);
        if (value instanceof Feature) {
            final Feature feature = (Feature) value;
            final String type = feature.getFeatureType().getQName().getLocalPart().toString();
            writer.write(String.format(Locale.US, "%-16s %-32s %-32s %-32s\n", type, feature.getId(), //$NON-NLS-1$
                    feature.getName(), feature.getDescription()));
        } else {//from   w w  w.  j a v a  2s. c om
            writer.write("[control entry]\n"); //$NON-NLS-1$
        }
    }
}

From source file:org.opentestsystem.delivery.testreg.upload.validator.fileformat.DuplicateRecordProcessor.java

private SortedSet<DataRecord> sort(final Set<DataRecord> recordSet) {
    final SortedSet<DataRecord> sortedSet = Sets.newTreeSet(new RowIndexBasedComparator());
    sortedSet.addAll(recordSet);
    return sortedSet;
}

From source file:org.dkpro.tc.fstore.simple.DenseFeatureStore.java

@Override
public SortedSet<String> getUniqueOutcomes() {
    SortedSet<String> uniqueOutcomes = new TreeSet<String>();
    for (Instance ins : instanceList) {
        uniqueOutcomes.addAll(ins.getOutcomes());
    }/*from  ww w  . jav  a2  s  . co m*/
    return uniqueOutcomes;
}

From source file:net.sourceforge.fenixedu.presentationTier.docs.accounting.ReceiptDocument.java

private List<ReceiptDocumentEntry> buildEntries() {

    final List<ReceiptDocumentEntry> result = new ArrayList<ReceiptDocumentEntry>();

    final SortedSet<Entry> sortedEntries = new TreeSet<Entry>(Entry.COMPARATOR_BY_MOST_RECENT_WHEN_REGISTERED);
    sortedEntries.addAll(receipt.getEntriesSet());

    for (final Entry entry : sortedEntries) {
        result.add(new ReceiptDocumentEntry(entry.getDescription().toString(this.messageResourceProvider),
                entry.getOriginalAmount().toPlainString()));
    }//from   w  ww  .  ja  va2s . co  m

    return result;

}

From source file:org.springframework.integration.print.core.PrintServiceExecutor.java

public SortedSet<DocFlavor> getDocFlavors() {
    final SortedSet<DocFlavor> docFlavors = new TreeSet<DocFlavor>(new DocFlavorComparator());
    docFlavors.addAll(Arrays.asList(this.printService.getSupportedDocFlavors()));
    return docFlavors;
}

From source file:net.praqma.jenkins.rqm.model.TestSuiteExecutionRecord.java

@Override
public SortedSet<TestCase> getAllTestCases() {
    SortedSet<TestCase> testCases = new TreeSet<TestCase>();
    testCases.addAll(getTestSuite().getTestcases());
    return testCases;
}

From source file:org.ralasafe.entitle.BackupManagerImpl.java

public Collection getBackups() {
    Collection backups = selector.select(new SelectCondition(), null);
    SortedSet result = Collections.synchronizedSortedSet(new TreeSet(comp));
    result.addAll(backups);
    return result;
}

From source file:org.estatio.fixturescripts.CreateRetroInvoices.java

@Programmatic
public SortedSet<LocalDate> findDueDatesForLease(LocalDate startDueDate, LocalDate nextDueDate, Lease lease) {
    final SortedSet<LocalDate> dates = Sets.newTreeSet();
    for (LeaseItem leaseItem : lease.getItems()) {
        dates.addAll(findDueDatesForLeaseItem(startDueDate, nextDueDate, leaseItem));
    }/*  ww  w.  j  a  v  a  2  s .c om*/
    return dates;
}

From source file:org.eclipse.skalli.model.ext.maven.internal.recommendedupdatesites.RecommendedUpdateSitesServiceImpl.java

@Override
protected SortedSet<Issue> validateEntity(RecommendedUpdateSites entity, Severity minSeverity) {
    SortedSet<Issue> issues = new TreeSet<Issue>();

    issues.addAll(validateValueIsNotBlank(entity));

    issues.addAll(validateUserId(entity));
    List<UpdateSite> updateSites = entity.getUpdateSites();
    for (UpdateSite updateSite : updateSites) {
        issues.addAll(validateMavenArtifactProperty(entity, updateSite.getGroupId(), "groupId"));
        issues.addAll(validateMavenArtifactProperty(entity, updateSite.getArtifactId(), "artifactId"));
        issues.addAll(validateProjectUUID(entity, updateSite));
        issues.addAll(validateShortName(entity));
    }//from w  w  w .  j  a va2  s  .  c  o  m
    return issues;
}

From source file:org.sventon.cache.logmessagecache.CompassLogMessageCacheTest.java

private SortedSet<ChangedPath> createAndAddToMap(ChangedPath... changedPath) {
    final SortedSet<ChangedPath> changedPaths = new TreeSet<ChangedPath>();
    changedPaths.addAll(Arrays.asList(changedPath));
    return changedPaths;
}