List of usage examples for java.util NavigableMap put
V put(K key, V value);
From source file:Main.java
public static void main(String[] args) { NavigableMap<Integer, String> map = new TreeMap<Integer, String>(); map.put(2, "two"); map.put(1, "one"); map.put(3, "three"); System.out.println(map.descendingMap() + "\n"); }
From source file:Main.java
public static void main(String[] args) { NavigableMap<Integer, String> map = new TreeMap<Integer, String>(); map.put(2, "two"); map.put(1, "one"); map.put(3, "three"); System.out.println(map.descendingKeySet() + "\n"); }
From source file:Main.java
public static void main(String[] args) { NavigableMap<Integer, String> map = new TreeMap<Integer, String>(); map.put(2, "two"); map.put(1, "one"); map.put(3, "three"); System.out.println(map.tailMap(1) + "\n"); }
From source file:Main.java
public static void main(String[] args) { NavigableMap<Integer, String> map = new TreeMap<Integer, String>(); map.put(2, "two"); map.put(1, "one"); map.put(3, "three"); System.out.println(map.subMap(1, 2) + "\n"); }
From source file:Main.java
public static void main(String[] args) { NavigableMap<Integer, String> map = new TreeMap<Integer, String>(); map.put(2, "two"); map.put(1, "one"); map.put(3, "three"); System.out.println(map.subMap(1, false, 2, false) + "\n"); }
From source file:Main.java
public static void main(String[] args) { NavigableMap<Integer, String> map = new TreeMap<Integer, String>(); map.put(2, "two"); map.put(1, "one"); map.put(3, "three"); System.out.println(map.navigableKeySet() + "\n"); }
From source file:Main.java
public static void main(String[] args) { NavigableMap<Integer, String> map = new TreeMap<Integer, String>(); map.put(2, "two"); map.put(1, "one"); map.put(3, "three"); System.out.println(map.tailMap(1, true) + "\n"); }
From source file:Main.java
public static void main(String[] args) { NavigableMap<Integer, String> map = new TreeMap<Integer, String>(); map.put(2, "two"); map.put(1, "one"); map.put(3, "three"); System.out.println(map.headMap(1) + "\n"); }
From source file:Main.java
public static void main(String[] args) { NavigableMap<Integer, String> map = new TreeMap<Integer, String>(); map.put(2, "two"); map.put(1, "one"); map.put(3, "three"); System.out.println(map.headMap(1, false) + "\n"); }
From source file:Main.java
public static void main(String args[]) { NavigableMap<String, String> nav = new TreeMap<String, String>(); nav.put("A", "a"); nav.put("B", "b"); nav.put("C", "c"); nav.put("D", "d"); nav.put("E", "e"); nav.put("F", "f"); System.out.println(nav);// ww w . ja v a 2 s.co m System.out.println(nav.floorEntry("G")); }