# Class: com.pnfsoftware.jeb.util.collect.MultiSegmentMap

Standard implementation of a multi\-segment map. This implementation relies on [TreeMap](TreeMap).

## Constructor: MultiSegmentMap

Description: Create a multi\-segment map using natural key ordering.

## Protected Constructor: MultiSegmentMap
- parameter: `comparator`, type: `java.util.Comparator<? super K>`

Description: Create a multi\-segment map using a custom key comparator.
parameter: comparator: key comparator

## Method: add
- parameter: `segment`, type: `V`
- return type: `V`


## Method: clear


## Method: compareKeys
- parameter: `a`, type: `K`
- parameter: `b`, type: `K`
- return type: `int`

Description: Compare two keys using this map's comparator.
parameter: a: first key
parameter: b: second key
return: comparison result

## Method: getFirstSegmentContaining
- parameter: `key`, type: `K`
- return type: `V`


## Method: getSegmentsContaining
- parameter: `key`, type: `K`
- return type: `java.util.List<V>`


## Method: isEmpty
- return type: `boolean`


## Method: size
- return type: `int`


