Options
All
  • Public
  • Public/Protected
  • All
Menu

Print Temperature Digits

This class extends from the PrintDigits class

This class let you insert temperature and print the temperature to the console in digit styled numbers.

Hierarchy

Index

Constructors

constructor

  • Create an instance of PrintTemperatureDigits class You don't have to fill in the arguments

    the default values of : framework = false largeDigits = false

    Just the same as the PrintDigits class

    Parameters

    • Default value framework: boolean = false
    • Default value largeDigits: boolean = false

    Returns PrintTemperatureDigits

Properties

Protected DigitConverter

DigitConverter: DigitConverter = new DigitConverter()

digitsHeight attribute

param

Message that will be managed by this PrintDigits class

access

protected

Private temperature

temperature: number = 0

Methods

disableFramework

  • disableFramework(): void

disableLargeLetters

  • disableLargeLetters(): void

enableFramework

  • enableFramework(): void

enableLargeDigits

  • enableLargeDigits(): void

getFramework

  • getFramework(): boolean
  • get framework

    this method returns the framework value

    true = see framework false = hide framework

    access

    public

    Returns boolean

    boolean

getLargeDigits

  • getLargeDigits(): boolean

getTemperature

  • getTemperature(): number

getTemperatureDigits

  • getTemperatureDigits(temperature?: number): Digit[]
  • Get Temperature Digits

    This method returns the temperature as a digit instance array

    default

    getTemperature()

    access

    public

    Parameters

    • Default value temperature: number = this.getTemperature()

    Returns Digit[]

    Digit instance array

intitialize

  • intitialize(framework: boolean, largeDigits: boolean): void
  • Initializer

    Initializes the instance of the printDigit with framework and largeDigit.

    access

    public

    Parameters

    • framework: boolean
    • largeDigits: boolean

    Returns void

    void

printDigits

  • printDigits(digit: Digit[]): void
  • printDigits method

    this method prints the given digitsArray as a digit styled string in the console.

    This class uses the toString method from this class

    access

    public

    Parameters

    Returns void

printStringAsDigits

  • printStringAsDigits(string: string): void
  • printStringAsDigits

    this method prints the given string as a digit styled string in the console

    This class uses the toDigitString method

    access

    public

    Parameters

    • string: string

    Returns void

printTemperature

  • printTemperature(temperature?: number, framework?: boolean, largeDigits?: boolean): void
  • print Temperature

    This method uses the printDigits method from the PrintDigit class and print the temperature to the console

    default

    getTemperature

    default

    framework = false

    default

    largeDigits = false

    access

    public

    Parameters

    • Default value temperature: number = this.getTemperature()
    • Default value framework: boolean = this.getFramework()
    • Default value largeDigits: boolean = this.getLargeDigits()

    Returns void

    Digit instance array

setFramework

  • setFramework(framework: boolean): void
  • set Framework

    this method sets the value of the framework

    true = see framework false = hide framework

    access

    public

    Parameters

    • framework: boolean

    Returns void

setLargeDigits

  • setLargeDigits(largeDigits: boolean): void
  • set Large Digits

    this method sets the value of the large digits

    true = large digits false = normal digits

    access

    public

    Parameters

    • largeDigits: boolean

    Returns void

setTemperature

  • setTemperature(temperature: number): void
  • Set Temperature

    set the temperature attribute via this method. Attention default temperature = 0

    default

    0

    access

    public

    Parameters

    • temperature: number

    Returns void

    void

Private temperatureToString

  • temperatureToString(temperature: number): string
  • temperature To String

    This method convets the temperature number to a string with the unit included

    default

    getTemperature()

    access

    private

    Parameters

    • temperature: number

    Returns string

    Digit instance array

toDigitString

  • toDigitString(string: string): string
  • toDigitString

    This method returns the digit string from a given string.

    access

    public

    Parameters

    • string: string

    Returns string

    string contains digit styled numbers

toString

  • toString(digits: Digit[]): string
  • toString

    this Method returns the digit string from a given digitsArray

    access

    public

    Parameters

    Returns string

    string contains digit styled numbers

Generated using TypeDoc