/** * Constructor. * @param bidi the parent bidi map * @param sm the subMap sorted map */ protected ViewMap(final DualTreeBidiMap<K, V> bidi, final SortedMap<K, V> sm) { // the implementation is not great here... // use the normalMap as the filtered map, but reverseMap as the full map // this forces containsValue and clear to be overridden super(new DualTreeBidiMap<>(sm, bidi.reverseMap, bidi.inverseBidiMap)); }
/** * Creates a new instance of this object. * * @param normalMap the normal direction map * @param reverseMap the reverse direction map * @param inverseMap the inverse BidiMap * @return new bidi map */ @Override protected DualTreeBidiMap<V, K> createBidiMap(final Map<V, K> normalMap, final Map<K, V> reverseMap, final BidiMap<K, V> inverseMap) { return new DualTreeBidiMap<>(normalMap, reverseMap, inverseMap); }