Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MapContainer<Key, T, Unique, Source, IteratorT, ReverseT>

Basic map container.

author

Jeongho Nam - https://github.com/samchon

Type parameters

  • Key

    Key type

  • T

    Mapped type

  • Unique: boolean

    Whether duplicated key is blocked or not

  • Source: MapContainer<Key, T, Unique, Source, IteratorT, ReverseT>

    Derived type extending this MapContainer

  • IteratorT: Iterator<Key, T, Unique, Source, IteratorT, ReverseT>

    Iterator type

  • ReverseT: ReverseIterator<Key, T, Unique, Source, IteratorT, ReverseT>

    Reverse iterator type

Hierarchy

Implements

Index

Type aliases

Static InsertRet

InsertRet<Key, T, Unique, SourceT, IteratorT, Reverse>: Unique extends true ? Pair<IteratorT, boolean> : IteratorT

Return type of {@link MapContainer.insert}

Type parameters

  • Key

  • T

  • Unique: boolean

  • SourceT: MapContainer<Key, T, Unique, SourceT, IteratorT, Reverse>

  • IteratorT: Iterator<Key, T, Unique, SourceT, IteratorT, Reverse>

  • Reverse: ReverseIterator<Key, T, Unique, SourceT, IteratorT, Reverse>

Static Iterator

Iterator<Key, T, Unique, SourceT, IteratorT, ReverseT>: IteratorBase<Key, T> & Readonly<Iterator<Entry<Key, T>, SourceT, IteratorT, ReverseT, IPair<Key, T>>>

Iterator of MapContainer

author

Jenogho Nam http://samchon.org

Type parameters

  • Key

  • T

  • Unique: boolean

  • SourceT: MapContainer<Key, T, Unique, SourceT, IteratorT, ReverseT>

  • IteratorT: Iterator<Key, T, Unique, SourceT, IteratorT, ReverseT>

  • ReverseT: ReverseIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>

Static ReverseIterator

ReverseIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>: IteratorBase<Key, T> & Readonly<ReverseIterator<Entry<Key, T>, SourceT, IteratorT, ReverseT, IPair<Key, T>>>

Reverse iterator of MapContainer

author

Jenogho Nam http://samchon.org

Type parameters

  • Key

  • T

  • Unique: boolean

  • SourceT: MapContainer<Key, T, Unique, SourceT, IteratorT, ReverseT>

  • IteratorT: Iterator<Key, T, Unique, SourceT, IteratorT, ReverseT>

  • ReverseT: ReverseIterator<Key, T, Unique, SourceT, IteratorT, ReverseT>

Constructors

Protected constructor

  • new MapContainer(factory: (thisArg: Source) => ILinearContainerBase<Entry<Key, T>, Source, IteratorT, ReverseT>): MapContainer
  • Default Constructor.

    Parameters

    • factory: (thisArg: Source) => ILinearContainerBase<Entry<Key, T>, Source, IteratorT, ReverseT>
        • (thisArg: Source): ILinearContainerBase<Entry<Key, T>, Source, IteratorT, ReverseT>
        • Parameters

          • thisArg: Source

          Returns ILinearContainerBase<Entry<Key, T>, Source, IteratorT, ReverseT>

    Returns MapContainer

Methods

[Symbol.iterator]

  • [Symbol.iterator](): IterableIterator<Entry<Key, T>>

assign

  • assign<InputIterator>(first: InputIterator, last: InputIterator): void

begin

  • begin(): IteratorT

clear

  • clear(): void

Abstract count

  • count(key: Key): number

empty

  • empty(): boolean

end

  • end(): IteratorT

erase

  • erase(key: Key): number
  • erase(it: IteratorT): IteratorT
  • erase(begin: IteratorT, end: IteratorT): IteratorT

Abstract find

  • find(key: Key): IteratorT

has

  • has(key: Key): boolean

Abstract merge

  • merge(source: Source): void

push

  • push(...items: IPair<Key, T>[]): number

rbegin

  • rbegin(): ReverseT

rend

  • rend(): ReverseT

size

  • size(): number

Abstract swap

  • swap(obj: Source): void

toJSON

  • toJSON(): Array<Entry<Key, T>>

Generated using TypeDoc