Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ObjectCacheBase<T>

A basic object cache.

template

T Type of the objects.

Type parameters

  • T

Hierarchy

Implements

Index

Methods

Abstract get

  • get<TValue>(obj: T, name: string, defaultValue?: TValue): TValue
  • Returns a value from the cache.

    Type parameters

    • TValue

    Parameters

    • obj: T
    • name: string
    • Optional defaultValue: TValue

    Returns TValue

    The value.

has

  • has(obj: T, name: string): boolean
  • Checks if the cache contains a value.

    Parameters

    • obj: T
    • name: string

    Returns boolean

    Contains value or not.

Abstract set

  • set<TValue>(obj: T, name: string, value: TValue): this
  • Sets a value for an object.

    Type parameters

    • TValue

    Parameters

    • obj: T
    • name: string
    • value: TValue

    Returns this

Static normalizeName

  • normalizeName(name: string): string
  • Normalizes a value name.

    Parameters

    • name: string

    Returns string

    The output value.

Generated using TypeDoc