private int count(K k) { Collection<V> t = map.get(k); if (t == null) { return 0; } return t.size(); }
private int count(K k) { Collection<V> t = map.get(k); if (t == null) { return 0; } return t.size(); }
private boolean containsEntry(K k, V v) { Collection<V> t = map.get(k); if (t == null) { return false; } return t.contains(v); }
private boolean containsEntry(K k, V v) { Collection<V> t = map.get(k); if (t == null) { return false; } return t.contains(v); }
private boolean containsEntry(K k, V v) { Collection<V> t = map.get(k); if (t == null) { return false; } return t.contains(v); }
private boolean containsEntry(K k, V v) { Collection<V> t = map.get(k); if (t == null) { return false; } return t.contains(v); }
private int count(K k) { Collection<V> t = map.get(k); if (t == null) { return 0; } return t.size(); }
private int count(K k) { Collection<V> t = map.get(k); if (t == null) { return 0; } return t.size(); }
private Stream<V> get(K k) { Collection<V> t = map.get(k); if (t == null) { return Stream.empty(); } return t.stream(); } }
private Stream<V> get(K k) { Collection<V> t = map.get(k); if (t == null) { return Stream.empty(); } return t.stream(); } }
private Stream<V> get(K k) { Collection<V> t = map.get(k); if (t == null) { return Stream.empty(); } return t.stream(); } }
private Stream<V> get(K k) { Collection<V> t = map.get(k); if (t == null) { return Stream.empty(); } return t.stream(); } }
/** * @param key key to look up * @return value */ public synchronized Collection<V> getValuesAsCollection(K key) { init(); Collection<V> t = map.get(key); if (t == null) { return Collections.emptyList(); } if (t instanceof SmallSet) { return new ArrayList<>(t); } if (t instanceof HPPCSet) { return new ArrayList<>(t); } return t; }
/** * @param key key to look up * @return value */ public synchronized Stream<V> getValues(K key) { init(); Collection<V> t = map.get(key); if (t == null) { return Stream.empty(); } if (t instanceof SmallSet) { return t.stream(); } if (t instanceof HPPCSet) { return new ArrayList<>(t).stream(); } return t.stream(); }
/** * @param key key to look up * @return value */ public synchronized Collection<V> getValuesAsCollection(K key) { init(); Collection<V> t = map.get(key); if (t == null) { return Collections.emptyList(); } if (t instanceof SmallSet) { return new ArrayList<>(t); } if (t instanceof HPPCSet) { return new ArrayList<>(t); } return t; }
/** * @param key key to look up * @return value */ public synchronized Collection<V> getValuesAsCollection(K key) { init(); Collection<V> t = map.get(key); if (t == null) { return Collections.emptyList(); } if (t instanceof SmallSet) { return new ArrayList<>(t); } if (t instanceof HPPCSet) { return new ArrayList<>(t); } return t; }
/** * @param key key to look up * @return value */ public synchronized Stream<V> getValues(K key) { init(); Collection<V> t = map.get(key); if (t == null) { return Stream.empty(); } if (t instanceof SmallSet) { return t.stream(); } if (t instanceof HPPCSet) { return new ArrayList<>(t).stream(); } return t.stream(); }
/** * @param key key to look up * @return value */ public synchronized Stream<V> getValues(K key) { init(); Collection<V> t = map.get(key); if (t == null) { return Stream.empty(); } if (t instanceof SmallSet) { return t.stream(); } if (t instanceof HPPCSet) { return new ArrayList<>(t).stream(); } return t.stream(); }
/** * @param key key to look up * @return value */ public synchronized Stream<V> getValues(K key) { init(); Collection<V> t = map.get(key); if (t == null) { return Stream.empty(); } if (t instanceof SmallSet) { return t.stream(); } if (t instanceof HPPCSet) { return new ArrayList<>(t).stream(); } return t.stream(); }
/** * @param <T> type of key * @param filter filter to satisfy * @param key key * @return set of values */ public synchronized <T> Collection<OWLAxiom> filterAxioms(OWLAxiomSearchFilter filter, T key) { init(); List<OWLAxiom> toReturn = new ArrayList<>(); for (AxiomType<?> at : filter.getAxiomTypes()) { // This method is only used for MapPointer<AxiomType, OWLAxiom> @SuppressWarnings("unchecked") Collection<V> collection = map.get((K) at); if (collection != null) { collection.stream().filter(x -> filter.pass(x, key)).forEach(toReturn::add); } } return toReturn; }