Options
All
  • Public
  • Public/Protected
  • All
Menu

THe class which controls which units and values are acceptable when transforming a set of ranges.

see

Base.normalize

see

Base.compact

see

Base.expand

see

Base.conversions

see

Base.filter

Hierarchy

  • Transform

Implements

Index

Constructors

constructor

  • Creates a new instance of Transform with an optional set of options to override the default values.

    Parameters

    • Optional input: TransformInput

      The options to apply to the new instance.

    Returns Transform

Properties

common

common: boolean = true

The option which determines whether only common or any group are valid. To only include common units this value must be true and to include common and uncommon this value must be false.

convertRate

convertRate: boolean = false

Whether conversions should convert the rate unit.

convertUnit

convertUnit: boolean = true

Whether conversions should convert the main unit.

convertWithMax

convertWithMax: boolean = true

Whether the minimum or maximum value of a range is used when producing conversions.

groupless

groupless: boolean = true

Whether ranges without units are considered valid for the transformation.

max

max: number = Number.MAX_VALUE

The maximum allowed value for the transformation.

min

min: number = -Number.MAX_VALUE

The mimimum allowed value for the transformation.

notClasses

notClasses: string[]

An array of class names that define the invalid ranges for a transformation.

notUnits

notUnits: string[]

An array of units that define the invalid ranges for a transformation.

onlyClasses

onlyClasses: string[]

An array of class names that define the valid ranges for a transformation.

onlyUnits

onlyUnits: string[]

An array of units that define the valid ranges for a transformation.

system

system: System = System.GIVEN

The desired system for the transformation.

Methods

extend

  • Returns a Transform instance which matches the desired options. If no options are specified the reference to this instance is returned. If the options are already an instance of Transform its returned. If options are specified a new instance is created with the options of this instance, and the given options applied with Transform.set.

    Parameters

    Returns Transform

    An instance of this class which matches the desired options.

isClassMatch

  • isClassMatch(parent: Class): boolean
  • Determines whether the given class matches the classes options on this instance.

    Parameters

    • parent: Class

      The class to test.

    Returns boolean

    True if the class matches the classes options, otherwise false.

isCommonMatch

  • isCommonMatch(group: Group): boolean
  • Determines whether the given group matches the common option on this instance.

    Parameters

    • group: Group

      The group to test.

    Returns boolean

    True if the group matches the common option, otherwise false.

isSystemMatch

  • isSystemMatch(group: Group, givenGroup?: Group): boolean
  • Determines whether the given group (and optionally a current group) matches the system option on this instance.

    Parameters

    • group: Group

      The group to test.

    • Optional givenGroup: Group

      The current group if available.

    Returns boolean

    True if the group matches ths system option, otherwise false.

isUnitMatch

  • isUnitMatch(group: Group): boolean
  • Determines whether the given group matches the unit options on this instance.

    Parameters

    • group: Group

      The group to test.

    Returns boolean

    True if the group matches the unit options, otherwise false.

isValidRange

  • isValidRange(range: Range): boolean
  • Determines whether the given range is valid according to this instance.

    Parameters

    • range: Range

      The range to test.

    Returns boolean

    True if the range matches this transform, otherwise false.

isVisibleGroup

  • isVisibleGroup(group: Group, givenGroup?: Group): boolean
  • Determines whether the given group (and optionally a current group) is valid or visible according to this instance.

    Parameters

    • group: Group

      The group to test.

    • Optional givenGroup: Group

      The current group if available.

    Returns boolean

    True if the group matches this transform, otherwise false.

set

  • Overrides values in this instance with ones specified in input.

    Parameters

    Returns this

    The reference to this instance.

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc