Home | History | Annotate | Download | only in jsr166

Lines Matching defs:Long

336         long v = adder.sumThenReset();
338 long v2 = adder.sum();
564 static ConcurrentHashMap<Long, Long> longMap;
566 static ConcurrentHashMap<Long, Long> longMap() {
568 longMap = new ConcurrentHashMap<Long, Long>(SIZE);
570 longMap.put(Long.valueOf(i), Long.valueOf(2 *i));
576 static class AddKeys implements BiFunction<Map.Entry<Long,Long>, Map.Entry<Long,Long>, Map.Entry<Long,Long>> {
577 public Map.Entry<Long,Long> apply(Map.Entry<Long,Long> x, Map.Entry<Long,Long> y) {
578 return new AbstractMap.SimpleEntry<Long,Long>
579 (Long.valueOf(x.getKey().longValue() + y.getKey().longValue()),
580 Long.valueOf(1L));
589 ConcurrentHashMap<Long, Long> m = longMap();
590 m.forEachKey(Long.MAX_VALUE, (Long x) -> adder.add(x.longValue()));
599 ConcurrentHashMap<Long, Long> m = longMap();
600 m.forEachValue(Long.MAX_VALUE, (Long x) -> adder.add(x.longValue()));
609 ConcurrentHashMap<Long, Long> m = longMap();
610 m.forEach(Long.MAX_VALUE, (Long x, Long y) -> adder.add(x.longValue() + y.longValue()));
619 ConcurrentHashMap<Long, Long> m = longMap();
620 m.forEachEntry(Long.MAX_VALUE, (Map.Entry<Long,Long> e) -> adder.add(e.getKey().longValue() + e.getValue().longValue()));
629 ConcurrentHashMap<Long, Long> m = longMap();
630 m.forEachKey(1L, (Long x) -> adder.add(x.longValue()));
639 ConcurrentHashMap<Long, Long> m = longMap();
640 m.forEachValue(1L, (Long x) -> adder.add(x.longValue()));
649 ConcurrentHashMap<Long, Long> m = longMap();
650 m.forEach(1L, (Long x, Long y) -> adder.add(x.longValue() + y.longValue()));
659 ConcurrentHashMap<Long, Long> m = longMap();
660 m.forEachEntry(1L, (Map.Entry<Long,Long> e) -> adder.add(e.getKey().longValue() + e.getValue().longValue()));
670 ConcurrentHashMap<Long, Long> m = longMap();
671 m.forEachKey(Long.MAX_VALUE, (Long x) -> Long.valueOf(4 * x.longValue()),
672 (Long x) -> adder.add(x.longValue()));
682 ConcurrentHashMap<Long, Long> m = longMap();
683 m.forEachValue(Long.MAX_VALUE, (Long x) -> Long.valueOf(4 * x.longValue()),
684 (Long x) -> adder.add(x.longValue()));
694 ConcurrentHashMap<Long, Long> m = longMap();
695 m.forEach(Long.MAX_VALUE, (Long x, Long y) -> Long.valueOf(x.longValue() + y.longValue()),
696 (Long x) -> adder.add(x.longValue()));
706 ConcurrentHashMap<Long, Long> m = longMap();
707 m.forEachEntry(Long.MAX_VALUE, (Map.Entry<Long,Long> e) -> Long.valueOf(e.getKey().longValue() + e.getValue().longValue()),
708 (Long x) -> adder.add(x.longValue()));
718 ConcurrentHashMap<Long, Long> m = longMap();
719 m.forEachKey(1L, (Long x) -> Long.valueOf(4 * x.longValue()),
720 (Long x) -> adder.add(x.longValue()));
730 ConcurrentHashMap<Long, Long> m = longMap();
731 m.forEachValue(1L, (Long x) -> Long.valueOf(4 * x.longValue()),
732 (Long x) -> adder.add(x.longValue()));
742 ConcurrentHashMap<Long, Long> m = longMap();
743 m.forEach(1L, (Long x, Long y) -> Long.valueOf(x.longValue() + y.longValue()),
744 (Long x) -> adder.add(x.longValue()));
754 ConcurrentHashMap<Long, Long> m = longMap();
755 m.forEachEntry(1L, (Map.Entry<Long,Long> e) -> Long.valueOf(e.getKey().longValue() + e.getValue().longValue()),
756 (Long x) -> adder.add(x.longValue()));
764 ConcurrentHashMap<Long, Long> m = longMap();
765 Long r;
766 r = m.reduceKeys(Long.MAX_VALUE, (Long x, Long y) -> Long.valueOf(x.longValue() + y.longValue()));
767 assertEquals((long)r, (long)SIZE * (SIZE - 1) / 2);
774 ConcurrentHashMap<Long, Long> m = longMap();
775 Long r;
776 r = m.reduceKeys(Long.MAX_VALUE, (Long x, Long y) -> Long.valueOf(x.longValue() + y.longValue()));
777 assertEquals((long)r, (long)SIZE * (SIZE - 1) / 2);
784 ConcurrentHashMap<Long, Long> m = longMap();
785 Map.Entry<Long,Long> r;
786 r = m.reduceEntries(Long.MAX_VALUE, new AddKeys());
787 assertEquals(r.getKey().longValue(), (long)SIZE * (SIZE - 1) / 2);
794 ConcurrentHashMap<Long, Long> m = longMap();
795 Long r;
796 r = m.reduceKeys(1L, (Long x, Long y) -> Long.valueOf(x.longValue() + y.longValue()));
797 assertEquals((long)r, (long)SIZE * (SIZE - 1) / 2);
804 ConcurrentHashMap<Long, Long> m = longMap();
805 Long r;
806 r = m.reduceValues(1L, (Long x, Long y) -> Long.valueOf(x.longValue() + y.longValue()));
807 assertEquals((long)r, (long)SIZE * (SIZE - 1));
814 ConcurrentHashMap<Long, Long> m = longMap();
815 Map.Entry<Long,Long> r;
817 assertEquals(r.getKey().longValue(), (long)SIZE * (SIZE - 1) / 2);
824 ConcurrentHashMap<Long, Long> m = longMap();
825 Long r = m.reduceKeys(Long.MAX_VALUE, (Long x) -> Long.valueOf(4 * x.longValue()),
826 (Long x, Long y) -> Long.valueOf(x.longValue() + y.longValue()));
827 assertEquals((long)r, (long)4 * SIZE * (SIZE - 1) / 2);
834 ConcurrentHashMap<Long, Long> m = longMap();
835 Long r = m.reduceValues(Long.MAX_VALUE, (Long x) -> Long.valueOf(4 * x.longValue()),
836 (Long x, Long y) -> Long.valueOf(x.longValue() + y.longValue()));
837 assertEquals((long)r, (long)4 * SIZE * (SIZE - 1));
844 ConcurrentHashMap<Long, Long> m = longMap();
845 Long r = m.reduce(Long.MAX_VALUE, (Long x, Long y) -> Long.valueOf(x.longValue() + y.longValue()),
846 (Long x, Long y) -> Long.valueOf(x.longValue() + y.longValue()));
848 assertEquals((long)r, (long)3 * SIZE * (SIZE - 1) / 2);
855 ConcurrentHashMap<Long, Long> m = longMap();
856 Long r = m.reduceKeys(1L, (Long x) -> Long.valueOf(4 * x.longValue()),
857 (Long x, Long y) -> Long.valueOf(x.longValue() + y.longValue()));
858 assertEquals((long)r, (long)4 * SIZE * (SIZE - 1) / 2);
865 ConcurrentHashMap<Long, Long> m = longMap();
866 Long r = m.reduceValues(1L, (Long x) -> Long.valueOf(4 * x.longValue()),
867 (Long x, Long y) -> Long.valueOf(x.longValue() + y.longValue()));
868 assertEquals((long)r, (long)4 * SIZE * (SIZE - 1));
875 ConcurrentHashMap<Long, Long> m = longMap();
876 Long r;
877 r = m.reduce(1L, (Long x, Long y) -> Long.valueOf(x.longValue() + y.longValue()),
878 (Long x, Long y) -> Long.valueOf(x.longValue() + y.longValue()));
879 assertEquals((long)r, (long)3 * SIZE * (SIZE - 1) / 2);
886 ConcurrentHashMap<Long, Long> m = longMap();
887 long lr = m.reduceKeysToLong(Long.MAX_VALUE, (Long x) -> x.longValue(), 0L, Long::sum);
888 assertEquals(lr, (long)SIZE * (SIZE - 1) / 2);
895 ConcurrentHashMap<Long, Long> m = longMap();
896 int ir = m.reduceKeysToInt(Long.MAX_VALUE, (Long x) -> x.intValue(), 0, Integer::sum);
904 ConcurrentHashMap<Long, Long> m = longMap();
905 double dr = m.reduceKeysToDouble(Long.MAX_VALUE, (Long x) -> x.doubleValue(), 0.0, Double::sum);
913 ConcurrentHashMap<Long, Long> m = longMap();
914 long lr = m.reduceValuesToLong(Long.MAX_VALUE, (Long x) -> x.longValue(), 0L, Long::sum);
915 assertEquals(lr, (long)SIZE * (SIZE - 1));
922 ConcurrentHashMap<Long, Long> m = longMap();
923 int ir = m.reduceValuesToInt(Long.MAX_VALUE, (Long x) -> x.intValue(), 0, Integer::sum);
931 ConcurrentHashMap<Long, Long> m = longMap();
932 double dr = m.reduceValuesToDouble(Long.MAX_VALUE, (Long x) -> x.doubleValue(), 0.0, Double::sum);
940 ConcurrentHashMap<Long, Long> m = longMap();
941 long lr = m.reduceKeysToLong(1L, (Long x) -> x.longValue(), 0L, Long::sum);
942 assertEquals(lr, (long)SIZE * (SIZE - 1) / 2);
949 ConcurrentHashMap<Long, Long> m = longMap();
950 int ir = m.reduceKeysToInt(1L, (Long x) -> x.intValue(), 0, Integer::sum);
958 ConcurrentHashMap<Long, Long> m = longMap();
959 Long x) -> x.doubleValue(), 0.0, Double::sum);
967 ConcurrentHashMap<Long, Long> m = longMap();
968 long lr = m.reduceValuesToLong(1L, (Long x) -> x.longValue(), 0L, Long::sum);
969 assertEquals(lr, (long)SIZE * (SIZE - 1));
976 ConcurrentHashMap<Long, Long> m = longMap();
977 int ir = m.reduceValuesToInt(1L, (Long x) -> x.intValue(), 0, Integer::sum);
985 ConcurrentHashMap<Long, Long> m = longMap();
986 double dr = m.reduceValuesToDouble(1L, (Long x) -> x.doubleValue(), 0.0, Double::sum);
995 ConcurrentHashMap<Long, Long> m = longMap();
996 Long r;
997 r = m.searchKeys(Long.MAX_VALUE, (Long x) -> x.longValue() == (long)(SIZE/2) ? x : null);
998 assertEquals((long)r, (long)(SIZE/2));
999 r = m.searchKeys(Long.MAX_VALUE, (Long x) -> x.longValue() < 0L ? x : null);
1008 ConcurrentHashMap<Long, Long> m = longMap();
1009 Long r;
1010 r = m.searchValues(Long.MAX_VALUE,
1011 (Long x) -> (x.longValue() == (long)(SIZE/2)) ? x : null);
1012 assertEquals((long)r, (long)(SIZE/2));
1013 r = m.searchValues(Long.MAX_VALUE,
1014 (Long x) -> (x.longValue() < 0L) ? x : null);
1023 ConcurrentHashMap<Long, Long> m = longMap();
1024 Long r;
1025 r = m.search(Long.MAX_VALUE, (Long x, Long y) -> x.longValue() == (long)(SIZE/2) ? x : null);
1026 assertEquals((long)r, (long)(SIZE/2));
1027 r = m.search(Long.MAX_VALUE, (Long x, Long y) -> x.longValue() < 0L ? x : null);
1036 ConcurrentHashMap<Long, Long> m = longMap();
1037 Long r;
1038 r = m.searchEntries(Long.MAX_VALUE, (Map.Entry<Long,Long> e) -> e.getKey().longValue() == (long)(SIZE/2) ? e.getKey() : null);
1039 assertEquals((long)r, (long)(SIZE/2));
1040 r = m.searchEntries(Long.MAX_VALUE, (Map.Entry<Long,Long> e) -> e.getKey().longValue() < 0L ? e.getKey() : null);
1049 ConcurrentHashMap<Long, Long> m = longMap();
1050 Long r;
1051 r = m.searchKeys(1L, (Long x) -> x.longValue() == (long)(SIZE/2) ? x : null);
1052 assertEquals((long)r, (long)(SIZE/2));
1053 r = m.searchKeys(1L, (Long x) -> x.longValue() < 0L ? x : null);
1062 ConcurrentHashMap<Long, Long> m = longMap();
1063 Long r;
1064 r = m.searchValues(1L, (Long x) -> x.longValue() == (long)(SIZE/2) ? x : null);
1065 assertEquals((long)r, (long)(SIZE/2));
1066 r = m.searchValues(1L, (Long x) -> x.longValue() < 0L ? x : null);
1075 ConcurrentHashMap<Long, Long> m = longMap();
1076 Long r;
1077 r = m.search(1L, (Long x, Long y) -> x.longValue() == (long)(SIZE/2) ? x : null);
1078 assertEquals((long)r, (long)(SIZE/2));
1079 r = m.search(1L, (Long x, Long y) -> x.longValue() < 0L ? x : null);
1088 ConcurrentHashMap<Long, Long> m = longMap();
1089 Long r;
1090 r = m.searchEntries(1L, (Map.Entry<Long,Long> e) -> e.getKey().longValue() == (long)(SIZE/2) ? e.getKey() : null);
1091 assertEquals((long)r, (long)(SIZE/2));
1092 r = m.searchEntries(1L, (Map.Entry<Long,Long> e) -> e.getKey().longValue() < 0L ? e.getKey() : null);