Java Collection Element Get getAllDoubleValues( Map>> doubleCollectionWithValuesToFetch)

Here you can find the source of getAllDoubleValues( Map>> doubleCollectionWithValuesToFetch)

Description

This method looks up all the values (for instance years) to display in the, selection box for search parameters when the FNumber box is selected.

License

Open Source License

Parameter

Parameter Description
doubleCollectionWithValuesToFetch is the collection to search for values to display.

Return

a sorted set with all found values for a specific based search box; FNumber

Declaration

public static Set<Double> getAllDoubleValues(
        Map<String, Map<Double, Set<Integer>>> doubleCollectionWithValuesToFetch) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) JavaPEG developers//from   ww  w  .j  av a2s . c o  m
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/

import java.util.*;

public class Main {
    /**
     * This method looks up all the values (for instance years) to display in
     * the, selection box for search parameters when the FNumber box is selected.
     *
     * @param doubleCollectionWithValuesToFetch is the collection to search
     *        for values to display.
     * @return a sorted set with all found values for a specific
     *         {@link Double} based search box; FNumber
     */
    public static Set<Double> getAllDoubleValues(
            Map<String, Map<Double, Set<Integer>>> doubleCollectionWithValuesToFetch) {
        Set<Double> returnValues = new TreeSet<Double>();

        for (String javaPegId : doubleCollectionWithValuesToFetch.keySet()) {
            returnValues.addAll(doubleCollectionWithValuesToFetch.get(javaPegId).keySet());
        }
        return returnValues;
    }
}

Related

  1. get(final Collection list, final int pos)
  2. get(final Collection collection, final int index)
  3. getAddedItems(Collection oldValues, Collection newValues)
  4. getAdditions(Collection source, Collection target)
  5. getAll(Map map, Collection indices)
  6. getAllTopicsAsString(final Collection topics)
  7. getAncestors(Collection> classes)
  8. getAnElement(Collection coll)
  9. getAny(final Collection collection)