Examples of MapEntry


Examples of clojure.lang.MapEntry

            this.values = values;
            this.i = i;
        }

        public Object first() {
            return new MapEntry(fields.get(i), values.get(i));
        }
View Full Code Here

Examples of com.github.krukow.clj_lang.MapEntry

    for (int i=4;i<10000;i++) {
      sm = (PersistentStructMap<String, Integer>) sm.assoc(i+"", i);
    }
    List<Map.Entry<String, Integer>> l = new ArrayList<Map.Entry<String,Integer>>();
    for (Map.Entry<String, Integer> e: sm) {l.add(e);}
    assertEquals(new MapEntry("1",1),l.get(0));
    assertEquals(new MapEntry("2",2),l.get(1));
    assertEquals(new MapEntry("3",3),l.get(2));
   
    assertEquals(9999,l.size());
   
    int i=9999;
    for (Iterator<Entry<String, Integer>> rit = sm.reverseIterator();rit.hasNext();) {
View Full Code Here

Examples of com.sleepycat.bdb.collection.MapEntry

        }
    }

    Map.Entry mapEntry(Object key, Object val) {

        return new MapEntry(key, val);
    }
View Full Code Here

Examples of de.jetwick.ese.util.MapEntry

                                else if ("F".equals(term))
                                    term = "false";

                                list.add(new FacetHelper(key, term, term, e.getCount()));
                            }
                            ret.set(integ, new MapEntry(ff.getName(), list));
                        }
                    } else if (facet instanceof FilterFacet) {
                        FilterFacet ff = (FilterFacet) facet;
                        String name = ff.getName();
                        int firstIndex = name.indexOf(":");
                        if (firstIndex < 0)
                            continue;

                        String key = name.substring(0, firstIndex);
                        String val = name.substring(firstIndex + 1);
                        System.out.println("NAME:"+name);
                        // exclude smaller zero?
                        Long count = ff.count();
                        if (count == null)
                            count = 0L;

                        Integer index = filterToIndex.get(key);
                        if (index == null)
                            continue;

                        Entry<String, List<FacetHelper>> facetEntry = ret.get(index);
                        List<FacetHelper> list;
                        if (facetEntry == null) {
                            facetEntry = new MapEntry(key, new ArrayList<FacetHelper>());
                            ret.set(index, facetEntry);
                        }

                        list = facetEntry.getValue();
                        list.add(new FacetHelper(key, val, translate(name), count));
View Full Code Here

Examples of de.jetwick.util.MapEntry

                        // exclude smaller zero?
                        list.add(new FacetHelper(key, term,
                                translate(key + ":" + term), e.getCount()));
                    }
                    ret.set(integ, new MapEntry(ff.getName(), list));
                }
            } else if (facet instanceof FilterFacet) {
                FilterFacet ff = (FilterFacet) facet;
                String name = ff.getName();
                int firstIndex = name.indexOf(":");
                if (firstIndex < 0)
                    continue;

                String key = name.substring(0, firstIndex);
                if (DATE.equals(key))
                    continue;

                String val = name.substring(firstIndex + 1);

                // exclude smaller zero?
                Long count = ff.count();
                if (count == null)
                    count = 0L;

                Integer index = filterToIndex.get(key);
                if (index == null)
                    continue;

                Entry<String, List<FacetHelper>> facetEntry = ret.get(index);
                List<FacetHelper> list;
                if (facetEntry == null) {
                    facetEntry = new MapEntry(key, new ArrayList<FacetHelper>());
                    ret.set(index, facetEntry);
                }

                list = facetEntry.getValue();
                list.add(new FacetHelper(key, val, translate(name), count));
View Full Code Here

Examples of de.timefinder.data.util.MapEntry

//        return new Object[]{new SimpleAssignmentMatrixImpl(origMatrix), oldAvailLocs};
//    }
    private Object createRollbackAssignData() {
        List locAssignment = new ArrayList(allAssignments.size());
        for (Assignment ass : allAssignments) {
            locAssignment.add(new MapEntry(ass, ass.getLocation()));
        }
        assert origMatrix.getColumns() == locAssignment.size() : origMatrix + " \n " + locAssignment;
        return new Object[]{new SimpleAssignmentMatrixImpl(origMatrix), locAssignment};
    }
View Full Code Here

Examples of de.timefinder.data.util.MapEntry

                if ("id".equalsIgnoreCase(column)) {
                    idParsing = parsing;
                    idColumn = counter;
                }

                columns.add(new MapEntry(method, parsing));
            }
            counter++;
        }

        if (columns.size() == 0) {
View Full Code Here

Examples of edu.lib.common.util.MapEntry

            throw new PrimitiveRuntimeException(new NullPointerException());
        }

        String resultStr = str;
      for (Iterator itor = MapTK.mapEntries(replacedTable); itor.hasNext(); ) {
          MapEntry entry = (MapEntry)itor.next();
          resultStr = StringTK.replace(resultStr, entry.getKey().toString(),
                  entry.getValue().toString());
      }
      return resultStr;
    }
View Full Code Here

Examples of groovy.util.MapEntry

                    }

                    // Step #2 Execute cell and store return value, associating it to the Axes and Columns it bound to
                    if (idCoord.size() == axisNames.length)
                    {   // Conditions on rule axes that do not evaluate to true, do not generate complete coordinates (intentionally skipped)
                        Map.Entry<List, Object> entry = new MapEntry(ruleIds, null);
                        if (!ruleIds.isEmpty())
                        {
                            trace.add(entry);
                        }

                        T cellValue = getCellById(idCoord, input, output);
                        executedCells.put(coord, cellValue);
                        entry.setValue(cellValue);
                    }

                    // Step #3 increment counters (variable radix increment)
                    done = incrementVariableRadixCount(counters, boundCoordinates, axisNames.length - 1, axisNames);
                }
View Full Code Here

Examples of kiss.lang.impl.MapEntry

    return exp;
  }

  public IMapEntry toMapEntry(Object key) {
    if (!isBound()) throw new KissException("Free symbols cannot be resolved: "+unboundDeps.toString());
    return new MapEntry((Symbol)key,value);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.