public abstract class Collectable implements Comparable <Collectable> {
	public final String masterType = "Collectable";
	private String type;	// extender should define their data type

	// enumerated interface
	public interface KeyTypes {
		String name();
	}
	protected abstract KeyTypes getKey();  	// this method helps force usage of KeyTypes

	// getter
	public String getMasterType() {
		return masterType;
	}

	// getter
	public String getType() {
		return type;
	}

	// setter
	public void setType(String type) {
		this.type = type;
	}
	
	// this method is used to establish key order
	public abstract String toString();

	// this method is used to compare toString of objects
	public int compareTo(Collectable obj) {
		return this.toString().compareTo(obj.toString());
	}

	// static print method used by extended classes
	public static void print(Collectable[] objs) {
		// print 'Object' properties
		System.out.println(objs.getClass() + " " + objs.length);

		// print 'Collectable' properties
		if (objs.length > 0) {
			Collectable obj = objs[0];	// Look at properties of 1st element
			System.out.println(
					obj.getMasterType() + ": " + 
					obj.getType() +
					" listed by " +
					obj.getKey());
		}

		// print "Collectable: Objects'
		for(Object o : objs)	// observe that type is Opaque
			System.out.println(o);

		System.out.println();
	}
}
public class Animal extends Collectable {
	// Class data
	public static KeyTypes key = KeyType.title;  // static initializer
	public static void setOrder(KeyTypes key) { Animal.key = key; }
	public enum KeyType implements KeyTypes {title, name, age, color}

	// Instance data
	private final String name;
	private final int age;
	private final String color;

	/* constructor
	 *
	 */
	public Animal(String name, int age, String color)
	{
		super.setType("Animal");
		this.name = name;
		this.age = age;
		this.color = color;
	}

	/* 'Collectable' requires getKey to help enforce KeyTypes usage */
	@Override
	protected KeyTypes getKey() { return Animal.key; }

	/* Getters / Accessors
	 * 
	 */
	public String getName() { return this.name; }
	public int getAge() { return this.age; }
	public String getColor() { return this.color; }

	
	/* 'Collectable' requires toString override
	 * toString provides data based off of Static Key setting
	 */
	@Override
	public String toString()
	{
		String output="";
		if (KeyType.name.equals(this.getKey())) {
			output += this.name;
		} else if (KeyType.age.equals(this.getKey())) {
			output += "00" + this.age;
			output = output.substring(output.length() - 2);
		} else if (KeyType.color.equals(this.getKey())) {
			output += this.color;
		} else {
			output += super.getType() + ": " + this.name + ", " + this.color + ", " + this.age;
		}
		return output;
		
	}

	// Test data initializer
	public static Animal[] animals() {
		return new Animal[]{
				new Animal("Lion", 8, "Gold"),
				new Animal("Pig", 3, "Pink"),
				new Animal("Robin", 7, "Red"),
				new Animal("Cat", 10, "Black"),
				new Animal("Kitty", 1, "Calico"),
				new Animal("Dog", 14, "Brown")
		};
	}
	
	/* main to test Animal class
	 * 
	 */
	public static void main(String[] args)
	{
		// Inheritance Hierarchy
		Animal[] objs = animals();

		// print with title
		Animal.setOrder(KeyType.title);
		Animal.print(objs);

		// convert to Coolection and sort in name order
		Animal.setOrder(KeyType.name);
		List<Animal> animals = new ArrayList<Animal>(Arrays.asList(objs));  // Array has asList conversion
		Collections.sort(animals);
		Animal.setOrder(KeyType.title);
		for (Animal animal : animals)
			System.out.println(animal);
	}

}
Animal.main(null);
class [LREPL.$JShell$13$Animal; 6
Collectable: Animal listed by title
Animal: Lion, Gold, 8
Animal: Pig, Pink, 3
Animal: Robin, Red, 7
Animal: Cat, Black, 10
Animal: Kitty, Calico, 1
Animal: Dog, Brown, 14

Animal: Cat, Black, 10
Animal: Dog, Brown, 14
Animal: Kitty, Calico, 1
Animal: Lion, Gold, 8
Animal: Pig, Pink, 3
Animal: Robin, Red, 7
import java.util.HashMap;

public class Pets {
    // create a new HashMap
    HashMap<String, Animal> names = new HashMap<>();

    /* Add Pets
     * 
     */
    public Pets() {
        // add some key-value pairs to the HashMap
        names.put("Leo", new Animal("Lion", 8, "Gold"));
        names.put("Porky", new Animal("Pig", 3, "Pink"));
        names.put("Ro-Ro", new Animal("Robin", 7, "Red"));
        names.put("Midnight", new Animal("Cat", 10, "Black"));
        names.put("Hobbes", new Animal("Kitty", 1, "Calico"));
        names.put("Duke", new Animal("Dog", 14, "Brown"));
    } 

    /* Remove Pet
     * 
     */
    public Animal remove(String key) {
        // check if a key exists in the HashMap then remove
        Animal animal = null;
        if (names.containsKey(key)) {
            animal = names.get(key);
            names.remove(key);
        }
        return animal;
    }

    /* Print Pets
     * 
     */
    public void print() {
        // iterate over the keys in the HashMap
        for (String name: names.keySet()) {
            Animal obj = names.get(name);
            System.out.println(name + " is a " + obj.getColor() + " " + obj.getName() + " and is " + obj.getAge() + " years old.");
        }
        System.out.println();
    }

    /* Tester Method
     * 
     */
    public static void main(String[] args) {

        // intialize Pets
        Pets pets = new Pets();
        pets.print();
        
        // remove a Pet
        String key = "Hobbes";
        Animal animal = pets.remove(key);
        if (animal == null) {
            System.out.println(key + " not found");
        } else {
            System.out.println("Removed: " + key + ", " + animal);
        }
        pets.print();

    }
}
Pets.main(null);
Hobbes is a Calico Kitty and is 1 years old.
Leo is a Gold Lion and is 8 years old.
Porky is a Pink Pig and is 3 years old.
Ro-Ro is a Red Robin and is 7 years old.
Duke is a Brown Dog and is 14 years old.
Midnight is a Black Cat and is 10 years old.

Removed: Hobbes, Animal: Kitty, Calico, 1
Leo is a Gold Lion and is 8 years old.
Porky is a Pink Pig and is 3 years old.
Ro-Ro is a Red Robin and is 7 years old.
Duke is a Brown Dog and is 14 years old.
Midnight is a Black Cat and is 10 years old.

import java.util.HashSet;
import java.util.Set;

public class AnimalSet {
    public static void main(String[] args) {
        // create a new HashSet
        Set<String> animals = new HashSet<>();

        // add some elements to the Set
        animals.add("lion");
        animals.add("dog");
        animals.add("cat");

        // print out the Set
        System.out.println(animals);

        // check if an element is in the Set
        boolean hasLion = animals.contains("lion");
        System.out.println("Has lion: " + hasLion);

        // remove an element from the Set
        animals.remove("lion");
        System.out.println("Removed lion");

        // print out the Set
        System.out.println(animals);

        // add duplicate
        System.out.println("add duplicate dog");
        animals.add("dog");  // no action
        System.out.println(animals);
        // add duplicate
        System.out.println("add pig");
        animals.add("pig");
        System.out.println(animals);

        // using forEach() method with a lambda expression
        animals.forEach(animal -> {
            String message = "I ";
            // ternary operation for like, don't like
            message += animal.equals("dog") ? "like" : "don't like";
            // complete sentance
            message += " " + animal + "s " + "for pets";
            System.out.println(message);
        });

    }
}
AnimalSet.main(null);
[cat, dog, lion]
Has lion: true
Removed lion
[cat, dog]
add duplicate dog
[cat, dog]
add pig
[cat, dog, pig]
I don't like cats for pets
I like dogs for pets
I don't like pigs for pets

Hacks

import java.util.*;
import java.util.HashMap;


public class Hash {

   public static void main(String[] args) {
      // Initialize HashMap with random key-value pairs
      HashMap<Integer, String> map = new HashMap<>();
      for (int i = 0; i < 5000; i++) {
         int key = new Random().nextInt(5000);
         String value = "haha " + i;
         map.put(key, value);
      }
      // Create a sorted list of keys
      List<Integer> sortedKeys = new ArrayList<>(map.keySet());
      System.out.println(sortedKeys);
      Collections.sort(sortedKeys);
      
      // Perform binary search on the sorted list and measure the time taken
      long startTimeBinary = System.nanoTime();
      int index = Collections.binarySearch(sortedKeys, 2500);
      long endTimeBinary = System.nanoTime();
      long durationBinary = (endTimeBinary - startTimeBinary);
      
      if (index >= 0) {
         int key = sortedKeys.get(index);
         String value = map.get(key);
         System.out.println("Value corresponding to key " + key + ": " + value);
      } else {
         System.out.println("Key not found");
      }
      
      // Print the time taken to perform the binary search
      System.out.println("Time taken to perform binary search (in nanoseconds): " + durationBinary);
      System.out.println("");

      long startTimeLookup = System.nanoTime();
      if (map.containsKey(2500)) {
         System.out.println("Value corresponding to key " + map.get(2500));
     } else {
         System.out.println("Key not found");
     }
     long endTimeLookup = System.nanoTime();
     long durationLookup = (endTimeLookup - startTimeLookup);
     System.out.println("Time taken to perform HashMap lookup (in nanoseconds): " + durationLookup);
   }
}
Hash.main(null);
[0, 1, 2, 3, 4, 5, 6, 7, 10, 15, 17, 19, 20, 21, 22, 23, 26, 27, 29, 31, 32, 33, 35, 36, 37, 39, 41, 45, 48, 50, 51, 53, 55, 56, 58, 59, 60, 62, 63, 65, 67, 68, 69, 70, 71, 74, 76, 78, 79, 80, 82, 84, 85, 86, 87, 88, 89, 91, 92, 93, 94, 95, 99, 100, 101, 103, 104, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, 118, 119, 121, 123, 125, 126, 129, 130, 131, 132, 133, 134, 135, 137, 138, 139, 141, 145, 148, 149, 150, 152, 155, 156, 159, 160, 161, 162, 164, 165, 166, 167, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 186, 187, 188, 189, 190, 193, 194, 195, 196, 197, 199, 200, 201, 202, 205, 206, 207, 208, 209, 210, 213, 217, 219, 221, 222, 223, 226, 229, 230, 231, 232, 233, 234, 235, 239, 240, 242, 243, 246, 250, 253, 255, 256, 257, 258, 259, 260, 264, 265, 268, 269, 271, 274, 277, 278, 281, 282, 285, 287, 289, 290, 291, 292, 293, 294, 298, 299, 300, 301, 304, 306, 307, 308, 309, 310, 311, 312, 314, 315, 316, 318, 319, 320, 321, 322, 323, 324, 325, 327, 329, 330, 333, 338, 340, 341, 342, 343, 351, 352, 357, 358, 359, 361, 365, 366, 369, 370, 372, 374, 376, 377, 379, 380, 381, 382, 384, 385, 386, 388, 391, 392, 394, 395, 396, 398, 403, 407, 410, 411, 414, 418, 419, 421, 422, 425, 426, 427, 429, 430, 431, 432, 433, 434, 435, 437, 438, 439, 443, 445, 446, 447, 448, 452, 453, 454, 455, 456, 458, 459, 460, 464, 466, 467, 470, 471, 474, 475, 476, 478, 480, 483, 484, 486, 487, 488, 489, 490, 492, 493, 495, 496, 497, 498, 500, 501, 502, 503, 504, 505, 509, 510, 512, 513, 516, 517, 518, 520, 521, 522, 524, 526, 529, 531, 532, 534, 535, 537, 538, 539, 541, 542, 543, 544, 545, 546, 547, 548, 549, 551, 553, 554, 555, 556, 558, 559, 560, 562, 563, 564, 565, 566, 567, 568, 569, 570, 573, 575, 576, 578, 579, 580, 582, 583, 584, 585, 587, 589, 590, 591, 594, 595, 597, 599, 601, 602, 603, 604, 606, 607, 608, 609, 610, 613, 614, 615, 616, 617, 618, 619, 621, 624, 625, 626, 628, 630, 633, 634, 636, 637, 638, 639, 640, 641, 642, 644, 646, 648, 649, 650, 652, 654, 655, 657, 659, 661, 662, 664, 665, 667, 668, 670, 671, 672, 673, 676, 678, 679, 683, 684, 686, 688, 691, 692, 693, 694, 695, 696, 698, 700, 701, 702, 703, 704, 705, 707, 713, 714, 715, 717, 718, 719, 722, 723, 727, 728, 731, 735, 736, 738, 739, 740, 741, 742, 743, 744, 746, 747, 750, 751, 752, 755, 756, 759, 760, 761, 762, 763, 764, 766, 767, 769, 771, 772, 773, 774, 775, 777, 778, 781, 783, 784, 785, 787, 788, 789, 792, 793, 795, 796, 798, 799, 800, 802, 803, 806, 807, 811, 812, 813, 814, 816, 819, 820, 821, 822, 823, 824, 825, 827, 830, 832, 833, 834, 836, 837, 838, 839, 841, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 855, 856, 863, 864, 869, 870, 872, 875, 877, 879, 882, 884, 886, 887, 889, 891, 892, 893, 894, 896, 898, 899, 900, 903, 905, 907, 908, 910, 911, 913, 914, 915, 916, 919, 920, 921, 923, 926, 928, 929, 930, 932, 935, 936, 937, 938, 939, 940, 942, 943, 947, 949, 950, 951, 952, 953, 954, 956, 958, 961, 963, 964, 965, 966, 967, 968, 971, 972, 973, 974, 975, 976, 977, 978, 979, 982, 987, 988, 989, 992, 993, 994, 995, 996, 999, 1000, 1001, 1002, 1003, 1005, 1006, 1007, 1008, 1013, 1014, 1016, 1017, 1018, 1021, 1022, 1024, 1027, 1028, 1029, 1030, 1031, 1032, 1034, 1036, 1039, 1040, 1041, 1042, 1045, 1046, 1048, 1049, 1050, 1052, 1053, 1055, 1056, 1057, 1059, 1060, 1062, 1063, 1066, 1067, 1068, 1069, 1070, 1072, 1073, 1074, 1075, 1078, 1080, 1085, 1086, 1087, 1088, 1092, 1093, 1094, 1095, 1097, 1098, 1100, 1102, 1103, 1104, 1107, 1108, 1109, 1110, 1111, 1112, 1114, 1115, 1116, 1117, 1121, 1122, 1123, 1124, 1126, 1128, 1131, 1132, 1133, 1134, 1137, 1141, 1143, 1144, 1148, 1149, 1150, 1152, 1156, 1159, 1160, 1161, 1162, 1166, 1168, 1169, 1171, 1173, 1174, 1178, 1179, 1180, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, 1195, 1197, 1199, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1209, 1210, 1211, 1215, 1216, 1217, 1219, 1220, 1221, 1222, 1224, 1225, 1226, 1227, 1229, 1231, 1233, 1234, 1235, 1236, 1238, 1239, 1240, 1241, 1243, 1244, 1245, 1246, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1255, 1257, 1258, 1259, 1260, 1261, 1262, 1264, 1265, 1266, 1267, 1268, 1270, 1272, 1275, 1276, 1277, 1278, 1280, 1281, 1282, 1283, 1287, 1290, 1291, 1292, 1293, 1294, 1295, 1297, 1298, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1309, 1310, 1312, 1314, 1315, 1317, 1320, 1322, 1324, 1325, 1326, 1327, 1330, 1331, 1332, 1334, 1336, 1339, 1340, 1342, 1346, 1347, 1349, 1351, 1352, 1353, 1354, 1356, 1357, 1358, 1359, 1360, 1361, 1362, 1363, 1364, 1366, 1367, 1368, 1369, 1370, 1373, 1374, 1378, 1379, 1381, 1382, 1383, 1384, 1386, 1387, 1388, 1391, 1393, 1394, 1396, 1397, 1399, 1402, 1403, 1404, 1405, 1406, 1414, 1415, 1416, 1417, 1418, 1419, 1422, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1432, 1435, 1436, 1437, 1439, 1440, 1445, 1446, 1447, 1449, 1450, 1451, 1454, 1458, 1459, 1461, 1465, 1466, 1472, 1473, 1480, 1481, 1482, 1485, 1486, 1487, 1488, 1489, 1491, 1492, 1493, 1495, 1498, 1500, 1503, 1505, 1507, 1509, 1510, 1511, 1512, 1513, 1515, 1516, 1518, 1520, 1521, 1522, 1523, 1525, 1526, 1527, 1528, 1529, 1530, 1532, 1533, 1535, 1538, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1560, 1561, 1566, 1567, 1569, 1570, 1571, 1573, 1574, 1575, 1577, 1579, 1580, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1592, 1594, 1595, 1596, 1597, 1598, 1599, 1600, 1602, 1603, 1604, 1605, 1606, 1608, 1609, 1610, 1611, 1614, 1616, 1617, 1619, 1622, 1623, 1625, 1626, 1630, 1632, 1633, 1638, 1641, 1645, 1646, 1647, 1648, 1649, 1650, 1651, 1653, 1654, 1655, 1656, 1657, 1659, 1661, 1662, 1664, 1665, 1667, 1668, 1669, 1671, 1672, 1673, 1674, 1675, 1677, 1679, 1680, 1681, 1682, 1683, 1684, 1686, 1691, 1692, 1693, 1694, 1696, 1697, 1698, 1701, 1704, 1705, 1706, 1707, 1708, 1709, 1712, 1713, 1715, 1716, 1718, 1720, 1721, 1722, 1726, 1727, 1728, 1731, 1733, 1735, 1737, 1738, 1739, 1740, 1741, 1742, 1743, 1744, 1745, 1747, 1748, 1750, 1751, 1752, 1754, 1755, 1757, 1758, 1760, 1761, 1762, 1763, 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1773, 1774, 1777, 1779, 1780, 1781, 1784, 1788, 1789, 1791, 1793, 1794, 1795, 1797, 1799, 1800, 1801, 1807, 1809, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 1823, 1826, 1828, 1829, 1832, 1834, 1835, 1836, 1837, 1838, 1842, 1843, 1845, 1846, 1847, 1848, 1849, 1850, 1852, 1855, 1856, 1857, 1858, 1862, 1863, 1864, 1865, 1869, 1870, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1880, 1882, 1884, 1885, 1886, 1887, 1889, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1898, 1899, 1900, 1901, 1903, 1904, 1906, 1907, 1911, 1913, 1914, 1917, 1919, 1921, 1923, 1924, 1925, 1927, 1929, 1930, 1933, 1935, 1936, 1938, 1939, 1940, 1944, 1946, 1947, 1948, 1951, 1954, 1955, 1956, 1957, 1958, 1959, 1962, 1963, 1965, 1966, 1969, 1971, 1972, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1988, 1990, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2010, 2011, 2012, 2014, 2015, 2017, 2020, 2021, 2022, 2023, 2030, 2031, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2043, 2044, 2045, 2046, 2049, 2051, 2052, 2053, 2054, 2055, 2057, 2058, 2059, 2060, 2061, 2063, 2068, 2070, 2073, 2074, 2076, 2078, 2079, 2080, 2081, 2082, 2085, 2086, 2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2098, 2099, 2101, 2103, 2104, 2105, 2106, 2109, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 2121, 2123, 2125, 2126, 2127, 2128, 2131, 2132, 2134, 2135, 2136, 2138, 2139, 2140, 2141, 2142, 2144, 2145, 2148, 2149, 2151, 2152, 2153, 2154, 2157, 2158, 2159, 2162, 2163, 2165, 2166, 2168, 2170, 2171, 2172, 2173, 2176, 2179, 2181, 2183, 2184, 2188, 2189, 2191, 2192, 2193, 2194, 2196, 2197, 2198, 2200, 2201, 2202, 2203, 2207, 2208, 2210, 2214, 2217, 2218, 2219, 2220, 2221, 2222, 2224, 2225, 2226, 2227, 2228, 2231, 2232, 2233, 2235, 2236, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 2250, 2252, 2255, 2256, 2257, 2258, 2261, 2263, 2266, 2267, 2268, 2269, 2270, 2271, 2272, 2274, 2275, 2276, 2277, 2278, 2279, 2281, 2282, 2283, 2284, 2286, 2288, 2289, 2292, 2293, 2294, 2295, 2298, 2299, 2300, 2302, 2304, 2305, 2306, 2307, 2308, 2310, 2312, 2314, 2317, 2319, 2320, 2321, 2322, 2323, 2324, 2325, 2329, 2332, 2334, 2335, 2338, 2339, 2340, 2341, 2342, 2348, 2352, 2353, 2354, 2355, 2357, 2358, 2359, 2360, 2361, 2362, 2363, 2364, 2365, 2366, 2367, 2368, 2372, 2374, 2375, 2376, 2378, 2379, 2380, 2383, 2386, 2387, 2388, 2389, 2391, 2392, 2394, 2395, 2396, 2397, 2398, 2399, 2400, 2402, 2403, 2406, 2407, 2409, 2411, 2412, 2414, 2415, 2418, 2419, 2420, 2421, 2424, 2425, 2427, 2428, 2432, 2433, 2436, 2438, 2442, 2444, 2446, 2448, 2449, 2451, 2452, 2453, 2455, 2456, 2458, 2462, 2464, 2467, 2468, 2470, 2471, 2472, 2475, 2476, 2477, 2479, 2480, 2481, 2483, 2489, 2490, 2491, 2492, 2493, 2499, 2501, 2502, 2504, 2505, 2506, 2509, 2511, 2512, 2513, 2514, 2515, 2517, 2518, 2520, 2521, 2522, 2523, 2525, 2526, 2528, 2529, 2530, 2531, 2533, 2534, 2535, 2536, 2537, 2538, 2541, 2542, 2543, 2545, 2548, 2550, 2551, 2552, 2553, 2556, 2558, 2562, 2563, 2567, 2571, 2572, 2573, 2574, 2575, 2577, 2579, 2580, 2581, 2582, 2583, 2584, 2587, 2588, 2591, 2597, 2598, 2600, 2601, 2602, 2608, 2610, 2611, 2612, 2614, 2615, 2616, 2618, 2620, 2621, 2622, 2623, 2625, 2626, 2629, 2630, 2632, 2633, 2634, 2635, 2638, 2639, 2641, 2642, 2644, 2645, 2648, 2649, 2650, 2651, 2653, 2654, 2655, 2656, 2658, 2659, 2660, 2664, 2665, 2667, 2668, 2671, 2673, 2674, 2675, 2678, 2680, 2681, 2682, 2683, 2684, 2685, 2686, 2688, 2689, 2691, 2692, 2694, 2695, 2696, 2698, 2699, 2702, 2704, 2705, 2706, 2707, 2709, 2710, 2711, 2713, 2714, 2715, 2718, 2719, 2725, 2726, 2727, 2733, 2734, 2735, 2737, 2738, 2739, 2744, 2746, 2747, 2749, 2750, 2751, 2752, 2753, 2754, 2755, 2756, 2757, 2758, 2760, 2761, 2762, 2763, 2764, 2765, 2768, 2769, 2770, 2771, 2774, 2775, 2776, 2779, 2782, 2783, 2785, 2786, 2787, 2788, 2789, 2791, 2792, 2793, 2794, 2795, 2796, 2798, 2799, 2801, 2802, 2803, 2804, 2805, 2806, 2807, 2808, 2810, 2813, 2815, 2817, 2818, 2819, 2820, 2821, 2822, 2825, 2826, 2828, 2829, 2830, 2833, 2835, 2836, 2837, 2838, 2839, 2841, 2842, 2843, 2845, 2846, 2848, 2850, 2851, 2852, 2853, 2854, 2857, 2858, 2859, 2860, 2863, 2864, 2867, 2868, 2869, 2870, 2873, 2877, 2878, 2879, 2881, 2882, 2883, 2884, 2885, 2886, 2887, 2888, 2889, 2892, 2894, 2895, 2896, 2898, 2901, 2903, 2904, 2906, 2908, 2911, 2916, 2918, 2920, 2922, 2923, 2925, 2926, 2930, 2931, 2935, 2938, 2939, 2941, 2942, 2943, 2944, 2948, 2949, 2952, 2953, 2955, 2957, 2958, 2959, 2960, 2962, 2963, 2964, 2966, 2968, 2969, 2970, 2971, 2972, 2973, 2974, 2975, 2976, 2977, 2978, 2981, 2982, 2983, 2984, 2985, 2986, 2987, 2988, 2989, 2990, 2992, 2999, 3000, 3004, 3005, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3021, 3023, 3025, 3028, 3031, 3032, 3038, 3041, 3042, 3043, 3045, 3046, 3047, 3050, 3051, 3052, 3053, 3054, 3059, 3060, 3061, 3063, 3064, 3065, 3067, 3068, 3069, 3070, 3072, 3073, 3074, 3075, 3076, 3079, 3080, 3083, 3084, 3086, 3088, 3089, 3090, 3091, 3092, 3095, 3096, 3099, 3100, 3101, 3103, 3104, 3105, 3106, 3110, 3114, 3115, 3116, 3118, 3119, 3120, 3121, 3122, 3125, 3126, 3127, 3128, 3131, 3133, 3134, 3135, 3137, 3138, 3139, 3140, 3141, 3142, 3143, 3145, 3147, 3148, 3150, 3151, 3152, 3153, 3156, 3158, 3160, 3161, 3163, 3165, 3166, 3167, 3170, 3172, 3175, 3177, 3179, 3180, 3182, 3185, 3186, 3187, 3190, 3191, 3192, 3194, 3197, 3202, 3204, 3207, 3208, 3209, 3211, 3212, 3213, 3217, 3218, 3223, 3224, 3225, 3226, 3229, 3230, 3231, 3232, 3233, 3235, 3236, 3238, 3239, 3241, 3242, 3243, 3244, 3245, 3246, 3248, 3249, 3250, 3251, 3252, 3254, 3257, 3258, 3259, 3260, 3262, 3264, 3265, 3266, 3267, 3269, 3271, 3272, 3273, 3274, 3276, 3277, 3278, 3281, 3282, 3284, 3288, 3289, 3290, 3291, 3292, 3293, 3294, 3295, 3296, 3298, 3301, 3302, 3303, 3304, 3305, 3306, 3307, 3309, 3311, 3313, 3314, 3315, 3316, 3318, 3319, 3320, 3322, 3323, 3325, 3326, 3327, 3328, 3329, 3330, 3332, 3333, 3336, 3337, 3339, 3340, 3341, 3343, 3345, 3346, 3347, 3348, 3349, 3353, 3357, 3358, 3360, 3361, 3365, 3367, 3368, 3369, 3370, 3372, 3373, 3374, 3379, 3380, 3382, 3384, 3389, 3390, 3392, 3394, 3395, 3397, 3398, 3399, 3400, 3401, 3402, 3405, 3407, 3408, 3410, 3411, 3412, 3413, 3414, 3415, 3417, 3420, 3421, 3422, 3423, 3424, 3425, 3427, 3429, 3433, 3435, 3436, 3438, 3442, 3443, 3444, 3445, 3446, 3447, 3448, 3449, 3450, 3451, 3452, 3453, 3455, 3456, 3459, 3460, 3462, 3463, 3464, 3465, 3468, 3469, 3470, 3471, 3474, 3478, 3479, 3480, 3482, 3483, 3485, 3486, 3488, 3492, 3494, 3495, 3497, 3498, 3500, 3504, 3505, 3508, 3509, 3511, 3515, 3516, 3517, 3519, 3520, 3521, 3522, 3523, 3524, 3525, 3527, 3529, 3530, 3531, 3533, 3534, 3536, 3537, 3538, 3539, 3543, 3545, 3546, 3547, 3548, 3550, 3552, 3554, 3555, 3556, 3557, 3558, 3564, 3565, 3568, 3569, 3572, 3574, 3575, 3576, 3577, 3578, 3579, 3580, 3584, 3585, 3587, 3590, 3591, 3592, 3593, 3594, 3595, 3596, 3600, 3601, 3603, 3604, 3605, 3608, 3610, 3611, 3612, 3613, 3614, 3615, 3619, 3623, 3624, 3625, 3626, 3628, 3629, 3630, 3631, 3633, 3634, 3635, 3636, 3637, 3638, 3639, 3640, 3641, 3644, 3645, 3646, 3647, 3649, 3650, 3651, 3652, 3653, 3654, 3655, 3656, 3658, 3659, 3661, 3662, 3663, 3664, 3665, 3667, 3669, 3674, 3675, 3676, 3679, 3680, 3681, 3683, 3685, 3687, 3690, 3692, 3694, 3695, 3696, 3697, 3698, 3699, 3701, 3702, 3705, 3706, 3708, 3709, 3710, 3711, 3715, 3716, 3720, 3721, 3724, 3732, 3733, 3735, 3737, 3738, 3739, 3741, 3742, 3744, 3745, 3746, 3747, 3748, 3749, 3751, 3752, 3753, 3754, 3755, 3756, 3757, 3758, 3759, 3761, 3762, 3763, 3765, 3766, 3769, 3770, 3771, 3773, 3774, 3780, 3781, 3784, 3786, 3787, 3788, 3789, 3790, 3792, 3794, 3795, 3796, 3800, 3801, 3803, 3805, 3806, 3807, 3808, 3809, 3810, 3811, 3812, 3814, 3815, 3816, 3817, 3818, 3820, 3821, 3822, 3823, 3824, 3825, 3827, 3828, 3829, 3830, 3831, 3834, 3835, 3838, 3839, 3840, 3841, 3843, 3845, 3846, 3849, 3850, 3852, 3855, 3857, 3858, 3859, 3860, 3861, 3862, 3866, 3868, 3869, 3873, 3876, 3878, 3879, 3880, 3881, 3883, 3884, 3886, 3887, 3888, 3891, 3893, 3894, 3895, 3897, 3899, 3901, 3902, 3904, 3905, 3908, 3909, 3910, 3911, 3912, 3914, 3916, 3917, 3919, 3921, 3923, 3926, 3927, 3930, 3931, 3932, 3933, 3936, 3937, 3938, 3939, 3940, 3941, 3942, 3944, 3946, 3948, 3949, 3951, 3952, 3953, 3955, 3956, 3957, 3958, 3960, 3961, 3962, 3964, 3965, 3966, 3968, 3970, 3971, 3973, 3974, 3976, 3978, 3981, 3982, 3983, 3986, 3987, 3988, 3989, 3991, 3994, 3995, 3997, 3999, 4002, 4003, 4004, 4006, 4007, 4009, 4011, 4013, 4014, 4015, 4016, 4018, 4020, 4022, 4025, 4027, 4028, 4029, 4031, 4032, 4033, 4034, 4035, 4036, 4038, 4043, 4044, 4045, 4047, 4048, 4049, 4050, 4052, 4055, 4056, 4057, 4058, 4060, 4062, 4064, 4065, 4066, 4067, 4068, 4070, 4072, 4073, 4074, 4075, 4076, 4077, 4078, 4080, 4081, 4082, 4083, 4084, 4085, 4086, 4087, 4088, 4089, 4091, 4092, 4093, 4094, 4095, 4096, 4097, 4098, 4100, 4101, 4102, 4103, 4105, 4106, 4107, 4109, 4111, 4112, 4113, 4115, 4116, 4119, 4120, 4121, 4122, 4124, 4125, 4126, 4127, 4128, 4129, 4131, 4133, 4134, 4135, 4136, 4137, 4138, 4139, 4140, 4144, 4146, 4150, 4151, 4153, 4156, 4157, 4158, 4162, 4163, 4164, 4165, 4169, 4170, 4171, 4172, 4173, 4175, 4176, 4177, 4178, 4179, 4180, 4183, 4185, 4186, 4188, 4189, 4190, 4191, 4193, 4194, 4197, 4198, 4199, 4200, 4201, 4202, 4203, 4204, 4205, 4208, 4209, 4210, 4214, 4216, 4218, 4219, 4222, 4224, 4225, 4227, 4228, 4230, 4231, 4233, 4235, 4236, 4238, 4241, 4242, 4244, 4245, 4248, 4249, 4253, 4254, 4256, 4257, 4259, 4260, 4261, 4264, 4267, 4268, 4270, 4272, 4274, 4275, 4278, 4280, 4282, 4283, 4284, 4285, 4286, 4287, 4288, 4291, 4292, 4293, 4295, 4297, 4298, 4300, 4301, 4302, 4303, 4304, 4305, 4308, 4309, 4310, 4311, 4312, 4313, 4314, 4315, 4316, 4317, 4318, 4320, 4321, 4322, 4324, 4325, 4326, 4327, 4328, 4329, 4330, 4332, 4333, 4334, 4335, 4336, 4337, 4338, 4339, 4340, 4341, 4342, 4343, 4345, 4346, 4347, 4348, 4349, 4352, 4354, 4355, 4356, 4359, 4360, 4361, 4362, 4363, 4364, 4365, 4366, 4367, 4369, 4371, 4372, 4377, 4378, 4379, 4380, 4381, 4385, 4386, 4387, 4388, 4389, 4390, 4391, 4392, 4394, 4395, 4396, 4398, 4402, 4403, 4404, 4406, 4407, 4408, 4409, 4410, 4412, 4413, 4414, 4415, 4417, 4418, 4419, 4420, 4421, 4422, 4425, 4426, 4430, 4431, 4432, 4433, 4434, 4436, 4437, 4439, 4441, 4442, 4445, 4447, 4448, 4450, 4451, 4454, 4458, 4459, 4460, 4462, 4464, 4465, 4469, 4471, 4472, 4473, 4474, 4477, 4478, 4479, 4481, 4482, 4484, 4486, 4487, 4489, 4490, 4492, 4494, 4497, 4498, 4500, 4502, 4503, 4504, 4505, 4507, 4508, 4509, 4511, 4513, 4514, 4516, 4518, 4519, 4521, 4524, 4525, 4526, 4527, 4530, 4532, 4533, 4535, 4540, 4542, 4543, 4544, 4546, 4548, 4550, 4551, 4552, 4553, 4554, 4557, 4558, 4560, 4561, 4562, 4563, 4564, 4566, 4567, 4568, 4569, 4570, 4572, 4574, 4577, 4578, 4579, 4580, 4583, 4584, 4586, 4587, 4588, 4589, 4590, 4591, 4592, 4593, 4594, 4595, 4596, 4597, 4598, 4600, 4601, 4602, 4603, 4604, 4607, 4608, 4612, 4616, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4627, 4628, 4629, 4630, 4631, 4633, 4634, 4635, 4636, 4637, 4638, 4640, 4642, 4643, 4645, 4649, 4651, 4652, 4653, 4654, 4656, 4662, 4663, 4664, 4665, 4667, 4668, 4669, 4670, 4671, 4673, 4675, 4676, 4677, 4681, 4682, 4683, 4685, 4687, 4688, 4689, 4690, 4691, 4692, 4693, 4696, 4697, 4699, 4700, 4701, 4703, 4704, 4705, 4706, 4709, 4710, 4711, 4712, 4713, 4715, 4716, 4717, 4719, 4720, 4721, 4722, 4723, 4724, 4726, 4728, 4731, 4732, 4733, 4734, 4735, 4739, 4740, 4742, 4745, 4748, 4749, 4750, 4752, 4753, 4755, 4756, 4757, 4758, 4759, 4760, 4761, 4762, 4766, 4768, 4769, 4770, 4772, 4773, 4774, 4778, 4779, 4780, 4781, 4782, 4783, 4784, 4787, 4789, 4790, 4791, 4793, 4794, 4795, 4797, 4798, 4799, 4800, 4802, 4803, 4804, 4806, 4807, 4810, 4817, 4820, 4821, 4822, 4823, 4824, 4825, 4826, 4828, 4829, 4830, 4833, 4834, 4835, 4836, 4838, 4840, 4841, 4843, 4844, 4845, 4849, 4850, 4851, 4854, 4856, 4857, 4858, 4861, 4862, 4864, 4866, 4868, 4869, 4871, 4874, 4876, 4877, 4880, 4881, 4882, 4884, 4887, 4890, 4891, 4894, 4895, 4896, 4897, 4899, 4901, 4903, 4904, 4905, 4906, 4907, 4910, 4911, 4913, 4915, 4918, 4921, 4922, 4923, 4924, 4927, 4930, 4931, 4932, 4933, 4934, 4935, 4936, 4937, 4939, 4940, 4941, 4942, 4943, 4945, 4946, 4948, 4949, 4950, 4951, 4952, 4953, 4954, 4955, 4956, 4957, 4958, 4960, 4963, 4964, 4965, 4968, 4969, 4970, 4972, 4973, 4974, 4975, 4976, 4978, 4980, 4982, 4983, 4984, 4986, 4993, 4996, 4997]
Key not found
Time taken to perform binary search (in nanoseconds): 8700

Key not found
Time taken to perform HashMap lookup (in nanoseconds): 65100