List of usage examples for java.util LinkedHashMap values
public Collection<V> values()
From source file:org.apache.hadoop.hive.metastore.Warehouse.java
public static List<String> getPartValuesFromPartName(String partName) throws MetaException { LinkedHashMap<String, String> partSpec = Warehouse.makeSpecFromName(partName); List<String> values = new ArrayList<String>(); values.addAll(partSpec.values()); return values; }
From source file:com.alibaba.wasp.meta.TestFMetaStore.java
public static LinkedHashMap<String, Field> clone(LinkedHashMap<String, Field> fields) { if (fields == null) { return null; }//from w ww.j a va 2s . co m LinkedHashMap<String, Field> clone = new LinkedHashMap<String, Field>(); for (Field field : fields.values()) { Field cloneField = clone(field); clone.put(cloneField.getName(), cloneField); } return clone; }
From source file:gov.llnl.lc.smt.command.route.SmtMulticast.java
public static SBN_MulticastGroup[] getWellKnownGroups(LinkedHashMap<String, SBN_MulticastGroup> mcGroups, boolean wellKnown) { // if wellKnown is true, only return the well_known groups // if wellKnown is false, only return the non-well_known groups java.util.ArrayList<SBN_MulticastGroup> gMems = new java.util.ArrayList<SBN_MulticastGroup>(); for (SBN_MulticastGroup g : mcGroups.values()) { // if this is a well known group, return it if (!(g.well_known ^ wellKnown)) gMems.add(g);//from w ww . j a v a 2 s . co m } SBN_MulticastGroup list[] = new SBN_MulticastGroup[gMems.size()]; return gMems.toArray(list); }
From source file:gov.llnl.lc.smt.command.route.SmtMulticast.java
public static SBN_MulticastGroup[] getGroupsWithMember(LinkedHashMap<String, SBN_MulticastGroup> mcGroups, IB_Guid guid) {/* w w w.j a v a 2 s . co m*/ if (guid == null) return null; // look through the groups, and build a new list which contains this guid as a member java.util.ArrayList<SBN_MulticastGroup> gMems = new java.util.ArrayList<SBN_MulticastGroup>(); for (SBN_MulticastGroup g : mcGroups.values()) { // if this contains this guid, then add it to the return list if (g.isMember(guid.getGuid())) gMems.add(g); } SBN_MulticastGroup list[] = new SBN_MulticastGroup[gMems.size()]; return gMems.toArray(list); }
From source file:com.google.gwt.emultest.java.util.LinkedHashMapTest.java
/** * Check the state of a newly constructed, empty LinkedHashMap. * * @param hashMap//from ww w . j a va 2s . co m */ private static void checkEmptyLinkedHashMapAssumptions(LinkedHashMap<?, ?> hashMap) { assertNotNull(hashMap); assertTrue(hashMap.isEmpty()); assertNotNull(hashMap.values()); assertTrue(hashMap.values().isEmpty()); assertTrue(hashMap.values().size() == 0); assertNotNull(hashMap.keySet()); assertTrue(hashMap.keySet().isEmpty()); assertTrue(hashMap.keySet().size() == 0); assertNotNull(hashMap.entrySet()); assertTrue(hashMap.entrySet().isEmpty()); assertTrue(hashMap.entrySet().size() == 0); assertNotNull(hashMap.entrySet().iterator()); assertFalse(hashMap.entrySet().iterator().hasNext()); }
From source file:info.mikaelsvensson.devtools.analysis.shared.AbstractAnalyzer.java
public static String getFormattedString(String pattern, File patternArgumentSourceFile) { // LinkedHashMap since the values should be returned in the order of insertion (for backwards compatibility) final LinkedHashMap<String, Object> values = new LinkedHashMap<String, Object>(); values.put("logFileName", patternArgumentSourceFile.getName()); values.put("logFileNameWithoutExt", StringUtils.substringBeforeLast(patternArgumentSourceFile.getName(), ".")); values.put("logFilePath", StringUtils.substringBeforeLast(patternArgumentSourceFile.getAbsolutePath(), ".")); values.put("logFilePathWithoutExt", StringUtils.substringBeforeLast(patternArgumentSourceFile.getAbsolutePath(), ".")); values.put("parentName", patternArgumentSourceFile.getParentFile().getName()); values.put("parentPath", patternArgumentSourceFile.getParentFile().getAbsolutePath()); // Add numeric "key" for each "parameter" (for backwards compability) int i = 0;/*from w ww . j a va2 s. c om*/ for (Object value : values.values().toArray()) { values.put(String.valueOf(i++), value); } // Use {key} format instead of ${key}, thus providing backwards compatibility with previously used MessageFormat. return StrSubstitutor.replace(pattern, values, "{", "}"); }
From source file:aldenjava.opticalmapping.data.data.DataNode.java
public static int getTotalSignal(LinkedHashMap<String, DataNode> optrefmap) { int total = 0; for (DataNode data : optrefmap.values()) total += data.getTotalSignal();// w w w . jav a 2 s .c om return total; }
From source file:aldenjava.opticalmapping.data.data.DataNode.java
public static long getTotalSize(LinkedHashMap<String, DataNode> optrefmap) { long total = 0; for (DataNode item : optrefmap.values()) { total += item.size;/* www . j ava 2 s. c o m*/ } return total; }
From source file:aldenjava.opticalmapping.data.data.DataNode.java
public static List<Kmer> getKmerWord(LinkedHashMap<String, DataNode> optrefmap, int kmerlen, long maxnosignalregion, List<GenomicPosNode> restrictedRegions) { List<Kmer> kmerList = new ArrayList<Kmer>(); for (DataNode ref : optrefmap.values()) { kmerList.addAll(ref.getKmerWord(kmerlen, maxnosignalregion, restrictedRegions)); }/*from w w w . ja v a 2s.c om*/ return kmerList; }
From source file:aldenjava.opticalmapping.data.data.DataNode.java
public static List<Kmer> getKmerWord(LinkedHashMap<String, DataNode> optrefmap, int kmerlen, long maxnosignalregion) { if (optrefmap == null) throw new NullPointerException("optrefmap"); List<Kmer> kmerList = new ArrayList<Kmer>(); for (DataNode ref : optrefmap.values()) { kmerList.addAll(ref.getKmerWord(kmerlen, maxnosignalregion)); }/*w w w . j ava 2 s . com*/ return kmerList; }