## org.apache.cassandra.io.util
Class ColumnSortedMap

    java.lang.Object
      org.apache.cassandra.io.util.ColumnSortedMap

All Implemented Interfaces:
  java.util.Map<java.nio.ByteBuffer,IColumn>, java.util.SortedMap<java.nio.ByteBuffer,IColumn>

    public class ColumnSortedMap

extends java.lang.Object
implements java.util.SortedMap<java.nio.ByteBuffer,IColumn>

Facade over a DataInput that contains IColumns in sorted order. We use this because passing a SortedMap to the ConcurrentSkipListMap constructor is the only way to invoke its private buildFromSorted method and avoid worst-case behavior of CSLM.put.

Nested Class Summary

Nested classes/interfaces inherited from interface java.util.Map
`java.util.Map.Entry<K,V>`

Constructor Summary
`ColumnSortedMap(java.util.Comparator<java.nio.ByteBuffer> comparator, ColumnSerializer serializer, java.io.DataInput dis, int length, IColumnSerializer.Flag flag, int expireBefore)`

Method Summary
`void` `clear()`
`java.util.Comparator<? super java.nio.ByteBuffer>` `comparator()`
`boolean` `containsKey(java.lang.Object key)`
`boolean` `containsValue(java.lang.Object value)`
`java.util.Set<java.util.Map.Entry<java.nio.ByteBuffer,IColumn>>` `entrySet()`
`java.nio.ByteBuffer` `firstKey()`
`IColumn` `get(java.lang.Object key)`
`java.util.SortedMap<java.nio.ByteBuffer,IColumn>` `headMap(java.nio.ByteBuffer toKey)`
`boolean` `isEmpty()`
`java.util.Set<java.nio.ByteBuffer>` `keySet()`
`java.nio.ByteBuffer` `lastKey()`
`IColumn` `put(java.nio.ByteBuffer key, IColumn value)`
`void` `putAll(java.util.Map<? extends java.nio.ByteBuffer,? extends IColumn> m)`
`IColumn` `remove(java.lang.Object key)`
`int` `size()`
`java.util.SortedMap<java.nio.ByteBuffer,IColumn>` `subMap(java.nio.ByteBuffer fromKey, java.nio.ByteBuffer toKey)`
`java.util.SortedMap<java.nio.ByteBuffer,IColumn>` `tailMap(java.nio.ByteBuffer fromKey)`
`java.util.Collection<IColumn>` `values()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface java.util.Map
`equals, hashCode`

Constructor Detail

### ColumnSortedMap

    public ColumnSortedMap(java.util.Comparator<java.nio.ByteBuffer> comparator,
                           ColumnSerializer serializer,
                           java.io.DataInput dis,
                           int length,
                           IColumnSerializer.Flag flag,
                           int expireBefore)

Method Detail

### size

    public int size()

  Specified by:
    `size` in interface `java.util.Map<java.nio.ByteBuffer,IColumn>`

### isEmpty

    public boolean isEmpty()

  Specified by:
    `isEmpty` in interface `java.util.Map<java.nio.ByteBuffer,IColumn>`

### containsKey

    public boolean containsKey(java.lang.Object key)

  Specified by:
    `containsKey` in interface `java.util.Map<java.nio.ByteBuffer,IColumn>`

### containsValue

    public boolean containsValue(java.lang.Object value)

  Specified by:
    `containsValue` in interface `java.util.Map<java.nio.ByteBuffer,IColumn>`

### get

    public IColumn get(java.lang.Object key)

  Specified by:
    `get` in interface `java.util.Map<java.nio.ByteBuffer,IColumn>`

### put

    public IColumn put(java.nio.ByteBuffer key,
                       IColumn value)

  Specified by:
    `put` in interface `java.util.Map<java.nio.ByteBuffer,IColumn>`

### remove

    public IColumn remove(java.lang.Object key)

  Specified by:
    `remove` in interface `java.util.Map<java.nio.ByteBuffer,IColumn>`

### putAll

    public void putAll(java.util.Map<? extends java.nio.ByteBuffer,? extends IColumn> m)

  Specified by:
    `putAll` in interface `java.util.Map<java.nio.ByteBuffer,IColumn>`

### clear

    public void clear()

  Specified by:
    `clear` in interface `java.util.Map<java.nio.ByteBuffer,IColumn>`

### comparator

    public java.util.Comparator<? super java.nio.ByteBuffer> comparator()

  Specified by:
    `comparator` in interface `java.util.SortedMap<java.nio.ByteBuffer,IColumn>`

### subMap

    public java.util.SortedMap<java.nio.ByteBuffer,IColumn> subMap(java.nio.ByteBuffer fromKey,
                                                                   java.nio.ByteBuffer toKey)

  Specified by:
    `subMap` in interface `java.util.SortedMap<java.nio.ByteBuffer,IColumn>`

### headMap

    public java.util.SortedMap<java.nio.ByteBuffer,IColumn> headMap(java.nio.ByteBuffer toKey)

  Specified by:
    `headMap` in interface `java.util.SortedMap<java.nio.ByteBuffer,IColumn>`

### tailMap

    public java.util.SortedMap<java.nio.ByteBuffer,IColumn> tailMap(java.nio.ByteBuffer fromKey)

  Specified by:
    `tailMap` in interface `java.util.SortedMap<java.nio.ByteBuffer,IColumn>`

### firstKey

    public java.nio.ByteBuffer firstKey()

  Specified by:
    `firstKey` in interface `java.util.SortedMap<java.nio.ByteBuffer,IColumn>`

### lastKey

    public java.nio.ByteBuffer lastKey()

  Specified by:
    `lastKey` in interface `java.util.SortedMap<java.nio.ByteBuffer,IColumn>`

### keySet

    public java.util.Set<java.nio.ByteBuffer> keySet()

  Specified by:
    `keySet` in interface `java.util.Map<java.nio.ByteBuffer,IColumn>`
  Specified by:
    `keySet` in interface `java.util.SortedMap<java.nio.ByteBuffer,IColumn>`

### values

    public java.util.Collection<IColumn> values()

  Specified by:
    `values` in interface `java.util.Map<java.nio.ByteBuffer,IColumn>`
  Specified by:
    `values` in interface `java.util.SortedMap<java.nio.ByteBuffer,IColumn>`

### entrySet

    public java.util.Set<java.util.Map.Entry<java.nio.ByteBuffer,IColumn>> entrySet()

  Specified by:
    `entrySet` in interface `java.util.Map<java.nio.ByteBuffer,IColumn>`
  Specified by:
    `entrySet` in interface `java.util.SortedMap<java.nio.ByteBuffer,IColumn>`

Copyright © 2012 The Apache Software Foundation