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

A List type suitable for long lists of unique items for which [presence checks](#contains(Object)) are *often* required. For typical list implementations, [#contains(Object)](#contains(Object)) is in O\(N\) and therefore slow for long lists. 

 Limitations: Neither duplicate \(per `equals`\) nor null entries are allowed. Methods throw [NullPointerException](NullPointerException) on attempts to insert null entries, and [IllegalArgumentException](IllegalArgumentException) on attempts to insert duplicates. 

 This class is not thread\-safe. This class is serializable.

## Constructor: HashedList


## Constructor: HashedList
- parameter: `initialCapacity`, type: `int`


## Constructor: HashedList
- parameter: `c`, type: `java.util.Collection<? extends E>`

Description: 
parameter: c: source collection, which should not contain duplicates or null entries

## Method: add
- parameter: `index`, type: `int`
- parameter: `element`, type: `E`


## Method: contains
- parameter: `o`, type: `java.lang.Object`
- return type: `boolean`

Description: Fast presence check, in O\(log N\) instead of O\(N\), the expected time complexity for search in a list.

## Method: containsAll
- parameter: `c`, type: `java.util.Collection<?>`
- return type: `boolean`

Description: Fast presence check, in O\(log N\) instead of O\(N\).

## Method: get
- parameter: `index`, type: `int`
- return type: `E`


## Method: remove
- parameter: `index`, type: `int`
- return type: `E`


## Method: set
- parameter: `index`, type: `int`
- parameter: `element`, type: `E`
- return type: `E`


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


