<commit_before>/*
 * Copyright (C) 2014 United States Government as represented by the Administrator of the
 * National Aeronautics and Space Administration. All Rights Reserved.
 */
/**
 * @exports BasicTimeSequence
 */

define([
        '../error/ArgumentError',
        '../util/Logger'
    ],
    function (ArgumentError, Logger) {
        "use strict";

        /**
         * Constructs a time sequence from an array of Dates.
         * @alias BasicTimeSequence
         * @constructor
         * @classdesc Represents a time sequence described as an ISO 8601 time-format string as required by WMS.
         * The string must be in the form start/end/period, where start and end are ISO 8601 time values and
         * period is an ISO 8601 period specification. This class provides iteration over the sequence in steps
         * specified by the period. If the start and end dates are different, iteration will start at the start
         * date and end at the end date. If the start and end dates are the same, iteration will start at the
         * specified date and will never end.
         * @param {Date[]} dates An array of Date objects.
         * @throws {ArgumentError} If the specified dates array is null, undefined or has a length less than two.
         */

        var BasicTimeSequence = function (dates) {

            if (!dates && dates.length < 2) {
                throw new ArgumentError(
                    Logger.logMessage(Logger.LEVEL_SEVERE, "BasicTimeSequence", "constructor", "missingDates"));
            }

            /**
             * This sequence's list of Dates.
             * @type {Date[]}
             */
            this.dates = dates;

            /**
             * This sequence's current index.
             * @type {Number}
             * @default 0.
             */
            this.currentIndex = 0;

            /**
             * This sequence's current time.
             * @type {Date}
             * @default This sequence's start time.
             */
            this.currentTime = dates[0];
        };<commit_msg>added a comment<commit_after>/*
 * Copyright (C) 2014 United States Government as represented by the Administrator of the
 * National Aeronautics and Space Administration. All Rights Reserved.
 */
/**
 * @exports BasicTimeSequence
 */

define([
        '../error/ArgumentError',
        '../util/Logger'
    ],
    function (ArgumentError, Logger) {
        "use strict";

        /**
         * Constructs a time sequence from an array of Dates.
         * @alias BasicTimeSequence
         * @constructor
         * @classdesc Represents a time sequence described as an array of Date objects as required by WMS.
         * This class provides iteration over the sequence in steps
         * specified by the period. If the start and end dates are different, iteration will start at the start
         * date and end at the end date.
         * @param {Date[]} dates An array of Date objects.
         * @throws {ArgumentError} If the specified dates array is null, undefined or has a length less than two.
         */

        var BasicTimeSequence = function (dates) {

            if (!dates && dates.length < 2) {
                throw new ArgumentError(
                    Logger.logMessage(Logger.LEVEL_SEVERE, "BasicTimeSequence", "constructor", "missingDates"));
            }

            /**
             * This sequence's list of Dates.
             * @type {Date[]}
             */
            this.dates = dates;

            /**
             * This sequence's current index.
             * @type {Number}
             * @default 0.
             */
            this.currentIndex = 0;

            /**
             * This sequence's current time.
             * @type {Date}
             * @default This sequence's start time.
             */
            this.currentTime = dates[0];
        };
{'fraction_non_alphanumeric': 0.08667695473251029, 'fraction_numerical': 0.00720164609053498, 'mean_word_length': 1.7138869504535938, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4913130', 'n_tokens_mistral': 961, 'n_tokens_neox': 914, 'n_words': 379}