@Test public void testRemove() { Histogram<String> histogram = new Histogram<>(); histogram.add("Apple", "Pear", "Plum", "Apple", "Apple", "Grape", "Pear"); histogram.remove("Apple"); Assert.assertEquals(0, histogram.getCount("Apple")); Assert.assertEquals(2, histogram.getCount("Pear")); Assert.assertEquals(1, histogram.getCount("Plum")); Assert.assertFalse(histogram.contains("Apple")); }
public void remove(T t) { map.remove(t); }
Histogram implements Iterable<T> { public void remove(T t) { map.remove(t); } }
Histogram implements Iterable<T> { public void remove(T t) { map.remove(t); } Histogram(int initialSize);  Histogram(Map<T, Integer> countMap);  Histogram(); }
Histogram implements Iterable<T> { public void remove(T t) { map.remove(t); } Histogram(int initialSize);  Histogram(Map<T, Integer> countMap);  Histogram(); static Histogram<String> loadFromLines(List<String> lines, char delimiter); static Histogram<String> loadFromLines(
      List<String> lines,
      char delimiter,
      boolean keyComesFirst); static Histogram<String> loadFromUtf8File(Path path, char delimiter); static Histogram<String> loadFromUtf8File(
      Path path,
      char delimiter,
      boolean keyComesFirst); static void serializeStringHistogram(Histogram<String> h, DataOutputStream dos); static Histogram<String> deserializeStringHistogram(DataInputStream dis); void saveSortedByCounts(Path path, String delimiter); void saveSortedByKeys(Path path, String delimiter, Comparator<T> comparator); int add(T t); int add(T t, int count); void add(Histogram<T> otherSet); T lookup(T item); void add(Collection<T> collection); @SafeVarargs final void add(T... array); int size(); void set(T t, int c); int decrementIfPositive(T t); int getCount(T t); boolean contains(T t); List<T> getTop(int n); int removeSmaller(int minCount); int removeLarger(int maxCount); int sizeSmaller(int amount); void remove(T t); void removeAll(Iterable<T> items); int sizeLarger(int amount); long totalCount(int minValue, int maxValue); int maxValue(); int minValue(); List<T> getItemsWithCount(int value); List<T> getItemsWithCount(int min, int max); double countPercent(int min, int max); List<T> getSortedList(); Set<T> getIntersectionOfKeys(Histogram<T> other); List<IntValueMap.Entry<T>> getSortedEntryList(); List<IntValueMap.Entry<T>> getEntryList(); long totalCount(Iterable<T> it); List<T> getSortedList(Comparator<T> comp); Set<T> getKeySet(); Iterator<T> iterator(); long totalCount(); }
Histogram implements Iterable<T> { public void remove(T t) { map.remove(t); } Histogram(int initialSize);  Histogram(Map<T, Integer> countMap);  Histogram(); static Histogram<String> loadFromLines(List<String> lines, char delimiter); static Histogram<String> loadFromLines(
      List<String> lines,
      char delimiter,
      boolean keyComesFirst); static Histogram<String> loadFromUtf8File(Path path, char delimiter); static Histogram<String> loadFromUtf8File(
      Path path,
      char delimiter,
      boolean keyComesFirst); static void serializeStringHistogram(Histogram<String> h, DataOutputStream dos); static Histogram<String> deserializeStringHistogram(DataInputStream dis); void saveSortedByCounts(Path path, String delimiter); void saveSortedByKeys(Path path, String delimiter, Comparator<T> comparator); int add(T t); int add(T t, int count); void add(Histogram<T> otherSet); T lookup(T item); void add(Collection<T> collection); @SafeVarargs final void add(T... array); int size(); void set(T t, int c); int decrementIfPositive(T t); int getCount(T t); boolean contains(T t); List<T> getTop(int n); int removeSmaller(int minCount); int removeLarger(int maxCount); int sizeSmaller(int amount); void remove(T t); void removeAll(Iterable<T> items); int sizeLarger(int amount); long totalCount(int minValue, int maxValue); int maxValue(); int minValue(); List<T> getItemsWithCount(int value); List<T> getItemsWithCount(int min, int max); double countPercent(int min, int max); List<T> getSortedList(); Set<T> getIntersectionOfKeys(Histogram<T> other); List<IntValueMap.Entry<T>> getSortedEntryList(); List<IntValueMap.Entry<T>> getEntryList(); long totalCount(Iterable<T> it); List<T> getSortedList(Comparator<T> comp); Set<T> getKeySet(); Iterator<T> iterator(); long totalCount();  }