com.github.grignaak.collections.OrderedMap Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cow-collections Show documentation
Show all versions of cow-collections Show documentation
Copy-on-write collections for easy, thread-safe, immutability
package com.github.grignaak.collections;
import java.util.Map;
import com.github.grignaak.collections.impl.Beta;
/**
* A map ordered by keys. This is similar to {@link java.util.NavigableMap} but simpler.
*/
@Beta
public interface OrderedMap extends Map {
Iterable> descendingEntries();
Iterable> descendingEntriesBefore(K upperBoundExclusive);
default Iterable> ascendingEntries() { return entrySet(); }
Iterable> ascendingEntriesAfter(K lowerBoundExclusive);
}