@Override public FloatComparator comparator() { synchronized (sync) { return sortedMap.comparator(); } } @Override
@Override public float firstFloatKey() { synchronized (sync) { return sortedMap.firstFloatKey(); } } @Override
/** * {@inheritDoc} * * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override public Float firstKey() { return sortedMap.firstKey(); } /**
/** * {@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 Float2ObjectSortedMap<V> subMap(final Float from, final Float to) { return subMap((from).floatValue(), (to).floatValue()); } /**
/** * 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<Float2ObjectMap.Entry<V>> fastIterable(Float2ObjectSortedMap<V> map) { final ObjectSortedSet<Float2ObjectMap.Entry<V>> entries = map.float2ObjectEntrySet(); return entries instanceof Float2ObjectSortedMap.FastSortedEntrySet ? ((Float2ObjectSortedMap.FastSortedEntrySet<V>) entries)::fastIterator : entries; } /**
/** * {@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 Float2ObjectSortedMap<V> tailMap(final Float from) { return tailMap((from).floatValue()); } /**
/** * {@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 Float2ObjectSortedMap<V> headMap(final Float to) { return headMap((to).floatValue()); } /**
@Override public float lastFloatKey() { return sortedMap.lastFloatKey(); } /**
@Override public FloatSortedSet keySet() { if (keys == null) keys = FloatSortedSets.synchronize(sortedMap.keySet(), sync); return (FloatSortedSet) keys; } @Override
/** * {@inheritDoc} * * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override public Float lastKey() { return sortedMap.lastKey(); } /**
@Override public Float2ObjectSortedMap<V> subMap(final float from, final float to) { return new UnmodifiableSortedMap<>(sortedMap.subMap(from, to)); } @Override
/** * 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<Float, V>> entrySet() { return (ObjectSortedSet) float2ObjectEntrySet(); } /**
@Override public Float2ObjectSortedMap<V> tailMap(final float from) { return new UnmodifiableSortedMap<>(sortedMap.tailMap(from)); } @Override
@Override public Float2ObjectSortedMap<V> headMap(final float to) { return new UnmodifiableSortedMap<>(sortedMap.headMap(to)); } @Override
@Override public float lastFloatKey() { synchronized (sync) { return sortedMap.lastFloatKey(); } } /**
@Override public FloatSortedSet keySet() { if (keys == null) keys = FloatSortedSets.unmodifiable(sortedMap.keySet()); return (FloatSortedSet) keys; } @Override
/** * {@inheritDoc} * * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override public Float lastKey() { synchronized (sync) { return sortedMap.lastKey(); } } /**
@Override public Float2ObjectSortedMap<V> subMap(final float from, final float to) { return new SynchronizedSortedMap<>(sortedMap.subMap(from, to), sync); } @Override
@Override public ObjectSortedSet<Float2ObjectMap.Entry<V>> float2ObjectEntrySet() { if (entries == null) entries = ObjectSortedSets.synchronize(sortedMap.float2ObjectEntrySet(), sync); return (ObjectSortedSet<Float2ObjectMap.Entry<V>>) entries; } /**
/** * {@inheritDoc} * * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override public Float2ObjectSortedMap<V> tailMap(final Float from) { return new UnmodifiableSortedMap<>(sortedMap.tailMap(from)); } }