<commit_before>/* 
 * Copyright (C) 2015-2016 <NAME>
 * All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the BSD license.  See the LICENSE file for details.
 */
package api.web.gw2.mapping.v2.professions;

import api.web.gw2.mapping.core.EnumValue;
import api.web.gw2.mapping.core.IdValue;

/**
 * Default JSON-P implementation of a profession weapon skill.
 * @author <NAME>
 */
public final class JsonpProfessionWeaponSkill implements ProfessionWeaponSkill {

    @IdValue
    private int id = IdValue.DEFAULT_INTEGER_ID;
    @EnumValue
    private ProfessionWeaponSlot slot = ProfessionWeaponSlot.UNKNOWN;

    /**
     * Creates a new empty instance.
     */
    public JsonpProfessionWeaponSkill() {
    }

    @Override
    public int id() {
        return id;
    }

    @Override
    public ProfessionWeaponSlot getSlot() {
        return slot;
    }
}<commit_msg>Added support for the offhand and attunement fields.<commit_after>/* 
 * Copyright (C) 2015-2016 <NAME>
 * All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the BSD license.  See the LICENSE file for details.
 */
package api.web.gw2.mapping.v2.professions;

import api.web.gw2.mapping.core.EnumValue;
import api.web.gw2.mapping.core.IdValue;
import api.web.gw2.mapping.core.OptionalValue;
import api.web.gw2.mapping.v2.items.ItemWeaponType;
import java.util.Optional;

/**
 * Default JSON-P implementation of a profession weapon skill.
 * @author <NAME>
 */
public final class JsonpProfessionWeaponSkill implements ProfessionWeaponSkill {

    @IdValue
    private int id = IdValue.DEFAULT_INTEGER_ID;
    @EnumValue
    private ProfessionWeaponSlot slot = ProfessionWeaponSlot.UNKNOWN;
    @OptionalValue
    @EnumValue
    private Optional<ItemWeaponType> offhand = Optional.empty();
    @OptionalValue
    @EnumValue
    private Optional<ProfessionElementalistAttunement> attunement = Optional.empty();

    /**
     * Creates a new empty instance.
     */
    public JsonpProfessionWeaponSkill() {
    }

    @Override
    public int id() {
        return id;
    }

    @Override
    public ProfessionWeaponSlot getSlot() {
        return slot;
    }

    @Override
    public Optional<ItemWeaponType> getOffhand() {
        return offhand;
    }

    @Override
    public Optional<ProfessionElementalistAttunement> getAttunement() {
        return attunement;
    }
}
{'fraction_non_alphanumeric': 0.08908045977011494, 'fraction_numerical': 0.011083743842364532, 'mean_word_length': 3.216262975778547, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '2405829', 'n_tokens_mistral': 763, 'n_tokens_neox': 733, 'n_words': 195}