@Override public ShortComparator comparator() { synchronized (sync) { return sortedMap.comparator(); } } @Override
/** * {@inheritDoc} * * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override public Short firstKey() { return sortedMap.firstKey(); } /**
@Override public short firstShortKey() { return sortedMap.firstShortKey(); } @Override
/** * {@inheritDoc} * <p> * Note that this specification strengthens the one given in * {@link SortedMap#tailMap(Object)}. * * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override default Short2ObjectSortedMap<V> tailMap(final Short from) { return tailMap((from).shortValue()); } /**
/** * Returns an iterable yielding a bidirectional iterator that will be * {@linkplain FastSortedEntrySet fast}, if possible, on the * {@linkplain Map#entrySet() entry set} of the provided {@code map}. * * @param map * a map from which we will try to extract an iterable yielding a * (fast) bidirectional iterator on the entry set. * @return an iterable yielding a bidirectional iterator on the entry set of the * given map that will be fast, if possible. * @since 8.0.0 */ @SuppressWarnings("unchecked") public static <V> ObjectBidirectionalIterable<Short2ObjectMap.Entry<V>> fastIterable(Short2ObjectSortedMap<V> map) { final ObjectSortedSet<Short2ObjectMap.Entry<V>> entries = map.short2ObjectEntrySet(); return entries instanceof Short2ObjectSortedMap.FastSortedEntrySet ? ((Short2ObjectSortedMap.FastSortedEntrySet<V>) entries)::fastIterator : entries; } /**
/** * {@inheritDoc} * <p> * Note that this specification strengthens the one given in * {@link SortedMap#subMap(Object,Object)}. * * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override default Short2ObjectSortedMap<V> subMap(final Short from, final Short to) { return subMap((from).shortValue(), (to).shortValue()); } /**
/** * {@inheritDoc} * <p> * Note that this specification strengthens the one given in * {@link SortedMap#headMap(Object)}. * * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override default Short2ObjectSortedMap<V> headMap(final Short to) { return headMap((to).shortValue()); } /**
@Override public short lastShortKey() { synchronized (sync) { return sortedMap.lastShortKey(); } } /**
/** * {@inheritDoc} * * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override public Short lastKey() { return sortedMap.lastKey(); } /**
@Override public ShortSortedSet keySet() { if (keys == null) keys = ShortSortedSets.unmodifiable(sortedMap.keySet()); return (ShortSortedSet) keys; } @Override
/** * {@inheritDoc} * * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override public Short2ObjectSortedMap<V> tailMap(final Short from) { return new SynchronizedSortedMap<>(sortedMap.tailMap(from), sync); } }
/** * Returns a sorted-set view of the mappings contained in this map. * <p> * Note that this specification strengthens the one given in the corresponding * type-specific unsorted map. * * @return a sorted-set view of the mappings contained in this map. * @see SortedMap#entrySet() * @deprecated Please use the corresponding type-specific method instead. */ @SuppressWarnings({"unchecked", "rawtypes"}) @Deprecated @Override default ObjectSortedSet<Map.Entry<Short, V>> entrySet() { return (ObjectSortedSet) short2ObjectEntrySet(); } /**
/** * {@inheritDoc} * * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override public Short2ObjectSortedMap<V> subMap(final Short from, final Short to) { return new SynchronizedSortedMap<>(sortedMap.subMap(from, to), sync); } /**
@Override public Short2ObjectSortedMap<V> headMap(final short to) { return new SynchronizedSortedMap<>(sortedMap.headMap(to), sync); } @Override
@Override public short lastShortKey() { return sortedMap.lastShortKey(); } /**
/** * {@inheritDoc} * * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override public Short lastKey() { synchronized (sync) { return sortedMap.lastKey(); } } /**
@Override public ShortSortedSet keySet() { if (keys == null) keys = ShortSortedSets.synchronize(sortedMap.keySet(), sync); return (ShortSortedSet) keys; } @Override
@Override public Short2ObjectSortedMap<V> tailMap(final short from) { return new UnmodifiableSortedMap<>(sortedMap.tailMap(from)); } @Override
@Override public ObjectSortedSet<Short2ObjectMap.Entry<V>> short2ObjectEntrySet() { if (entries == null) entries = ObjectSortedSets.synchronize(sortedMap.short2ObjectEntrySet(), sync); return (ObjectSortedSet<Short2ObjectMap.Entry<V>>) entries; } /**
/** * {@inheritDoc} * * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override public Short2ObjectSortedMap<V> subMap(final Short from, final Short to) { return new UnmodifiableSortedMap<>(sortedMap.subMap(from, to)); } /**