Guava ImmutableSortedMap.Builder - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Guava ImmutableSortedMap.Builder class.

This code example shows how to use the following methods:build, putAll
    public COWSortedMap(Map<K, V> map) {
        if (map == null) {
            throw new IllegalArgumentException("Wrapped map cannot be null");
        m_map = new AtomicReference<ImmutableSortedMap<K, V>>(ImmutableSortedMap.<K, V>naturalOrder().putAll(map).build());
    public int size() { 
        return m_map.get().size();
    public Map<K, V> get() {
        return m_map.get();
    public boolean isEmpty() { 
        return m_map.get().isEmpty();

See Code Examples for Guava ImmutableSortedMap.Builder Methods: