# All files / src UnicodeArray.ts

88.89% Statements 8/9
100% Branches 0/0
100% Functions 1/1
88.89% Lines 8/9

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    521x

    1x

    522x

    7175x

    33433x

    8727x

    519x

    519x

     import { Utils } from './Utils';

    export class UnicodeArray {
        /**
         * @type {string[]}
         */
        private array: string[] = [];

        /**
         * @param value
         */
        public addToArray (value: string): void {
            this.array.push(value);
        }

        /**
         * @returns {string[]}
         */
        public getArray (): string[] {
            return this.array;
        }

        /**
         * @param value
         * @returns {number}
         */
        public getIndexOf(value: string): number {
            return this.array.indexOf(value);
        }

        /**
         * @returns {number}
         */
        public getLength (): number {
            return this.array.length;
        }

        /**
         * @param rotationValue
         */
        public rotateArray (rotationValue: number): void {
            this.array = Utils.arrayRotate(this.array, rotationValue);
        }

        /**
         * @returns {string}
         */
        public toString (): string {
            return this.array.toString();
        }
    }