Options
All
  • Public
  • Public/Protected
  • All
Menu

SortedSetObs

Ordered set (order by comparator result ASC/DESC)

This is extended, experimental version of Set implementing Observer pattern (Observable elements notify this - Observer Set about important changes which may affect order of elements or just structure of this Set)

Type parameters

Hierarchy

Implements

Index

Constructors

constructor

Properties

Private _comparator

_comparator: Comparator<T>

_comparator

param
param

Protected _elements

_elements: T[] = []

_elements

Protected sort

sort: ORDER

sort

Static Readonly ACTION_ADD

ACTION_ADD: "ACTION_ADD" = "ACTION_ADD"

Types of actions

Static Readonly ACTION_CLEAR

ACTION_CLEAR: "ACTION_CLEAR" = "ACTION_CLEAR"

Static Readonly ACTION_DELETE

ACTION_DELETE: "ACTION_DELETE" = "ACTION_DELETE"

Static Readonly ACTION_REPLACE

ACTION_REPLACE: "ACTION_REPLACE" = "ACTION_REPLACE"

Accessors

elements

  • get elements(): T[]
  • set elements(elements: T[]): void

Methods

[Symbol.iterator]

  • [Symbol.iterator](): any

Protected actionAdd

  • actionAdd(elements: T[]): void

Protected actionClear

  • actionClear(): this

Protected actionDelete

  • actionDelete(elements: T[]): void

add

  • add(...element: T[]): this

Protected afterAction

  • afterAction(fName: string, elements: T | T[]): void

Protected beforeAction

  • beforeAction(fName: string, elements: T | T[]): void

clear

  • clear(): this

delete

  • delete(...elements: T[]): this

has

  • has(element: T): boolean

hasAll

  • hasAll(...element: T[]): boolean

hasNot

  • hasNot(element: T): boolean

Protected isUnique

  • isUnique(element: T): boolean

refresh

  • refresh(): void

Protected replaceAndPreventHook

  • replaceAndPreventHook(elements: T[]): void

Protected replaceWithHook

  • replaceWithHook(elements: T[]): void

reverseOrder

  • reverseOrder(): void

setSort

  • setSort(sort: ORDER): void

size

  • size(): number

Protected sortSet

  • sortSet(): void

toString

  • toString(): string

update

  • update(element: T): void

Static isHashableNumType

  • isHashableNumType(value: any): value is HashableReturnNum

Static isHashableStrType

  • isHashableStrType(value: any): value is HashableReturnStr

Legend

  • Constructor
  • Method
  • Accessor
  • Inherited constructor
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Static property
  • Static method
  • Method
  • Private property

Generated using TypeDoc