<commit_before>﻿// Copyright 2013 <NAME>
// 
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;

namespace Yeena.PathOfExile {
    [JsonObject]
    class PoEItemModCategory : IEnumerable<PoEItemModList> {
        [JsonProperty("name")]
        private readonly string _name;
        [JsonProperty("modLists")]
        private readonly List<PoEItemModList> _modLists;

        public string Name { get { return _name; } }
        public IReadOnlyList<PoEItemModList> ModLists { get { return _modLists; } } 

        [JsonConstructor]
        private PoEItemModCategory() {
        }

        public PoEItemModCategory(string name, IEnumerable<PoEItemModList> mods) {
            _name = name;
            _modLists = mods.ToList();
        }

        public IEnumerator<PoEItemModList> GetEnumerator() {
            return _modLists.GetEnumerator();
        }

        IEnumerator IEnumerable.GetEnumerator() {
            return GetEnumerator();
        }

        public override string ToString() {
            return Name;
        }
    }
}<commit_msg>Make PoEItemModCategory implement IReadOnlyList<PoEItemModList><commit_after>﻿// Copyright 2013 <NAME>
// 
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;

namespace Yeena.PathOfExile {
    [JsonObject]
    class PoEItemModCategory : IReadOnlyList<PoEItemModList> {
        [JsonProperty("name")]
        private readonly string _name;
        [JsonProperty("modLists")]
        private readonly List<PoEItemModList> _modLists;

        public string Name { get { return _name; } }
        public IReadOnlyList<PoEItemModList> ModLists { get { return _modLists; } } 

        [JsonConstructor]
        private PoEItemModCategory() {
        }

        public PoEItemModCategory(string name, IEnumerable<PoEItemModList> mods) {
            _name = name;
            _modLists = mods.ToList();
        }

        public IEnumerator<PoEItemModList> GetEnumerator() {
            return _modLists.GetEnumerator();
        }

        IEnumerator IEnumerable.GetEnumerator() {
            return GetEnumerator();
        }

        public int Count {
            get { return _modLists.Count; }
        }

        public PoEItemModList this[int index] {
            get { return _modLists[index]; }
        }

        public override string ToString() {
            return Name;
        }
    }
}
{'fraction_non_alphanumeric': 0.08665171060011218, 'fraction_numerical': 0.00448681996634885, 'mean_word_length': 2.610323886639676, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3001944', 'n_tokens_mistral': 979, 'n_tokens_neox': 955, 'n_words': 306}