Android Open Source - dexedd Stat Spread






From Project

Back to project page dexedd.

License

The source code is released under:

MIT License

If you think the Android project dexedd listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.nav.dexedd.model;
/* w w  w.  j  a v  a 2s. co  m*/
/**
 * Class representing the stats of a Pokmon.
 *
 * @author Eduardo Naveda
 * @since 0.0.1
 */
public class StatSpread {

    private Stat healthPoints;
    private Stat attack;
    private Stat defense;
    private Stat specialAttack;
    private Stat specialDefense;
    private Stat speed;

    public Stat getHealthPoints() {
        return healthPoints;
    }

    public void setHealthPoints(Stat hp) {
        this.healthPoints = hp;
    }

    public Stat getAttack() {
        return attack;
    }

    public void setAttack(Stat attack) {
        this.attack = attack;
    }

    public Stat getDefense() {
        return defense;
    }

    public void setDefense(Stat defense) {
        this.defense = defense;
    }

    public Stat getSpecialAttack() {
        return specialAttack;
    }

    public void setSpecialAttack(Stat specialAttack) {
        this.specialAttack = specialAttack;
    }

    public Stat getSpecialDefense() {
        return specialDefense;
    }

    public void setSpecialDefense(Stat specialDefense) {
        this.specialDefense = specialDefense;
    }

    public Stat getSpeed() {
        return speed;
    }

    public void setSpeed(Stat speed) {
        this.speed = speed;
    }

    /**
     * Sets a specific stat by its id:<br><br>
     * <p/>
     * 1: HP<br>
     * 2: Attack<br>
     * 3: Defense<br>
     * 4: Special Attack<br>
     * 5: Special Defense<br>
     * 6: Speed<br>
     *
     * @param stat   The stat to set
     * @param statId The stat id
     */
    public void setStat(Stat stat, Integer statId) {
        switch (statId) {
            case 1:
                setHealthPoints(stat);
                break;
            case 2:
                setAttack(stat);
                break;
            case 3:
                setDefense(stat);
                break;
            case 4:
                setSpecialAttack(stat);
                break;
            case 5:
                setSpecialDefense(stat);
                break;
            case 6:
                setSpeed(stat);
                break;
        }
    }
}




Java Source Code List

com.nav.dexedd.activity.DexEntryActivity.java
com.nav.dexedd.activity.Dexedd.java
com.nav.dexedd.activity.MainActivity.java
com.nav.dexedd.activity.SplashActivity.java
com.nav.dexedd.adapter.DexAdapter.java
com.nav.dexedd.adapter.TreeAdapter.java
com.nav.dexedd.fragment.DatabaseInitFragment.java
com.nav.dexedd.fragment.NavigationDrawerFragment.java
com.nav.dexedd.model.Ability.java
com.nav.dexedd.model.EggGroup.java
com.nav.dexedd.model.EvolutionCondition.java
com.nav.dexedd.model.Item.java
com.nav.dexedd.model.Location.java
com.nav.dexedd.model.Move.java
com.nav.dexedd.model.Pokemon.java
com.nav.dexedd.model.Region.java
com.nav.dexedd.model.StatSpread.java
com.nav.dexedd.model.Stat.java
com.nav.dexedd.model.Type.java
com.nav.dexedd.persistence.DexDatabase.java
com.nav.dexedd.persistence.access.Access.java
com.nav.dexedd.persistence.access.DexEntry.java
com.nav.dexedd.persistence.access.Dex.java
com.nav.dexedd.structure.Tree.java
com.nav.dexedd.text.CleanClickableSpan.java
com.nav.dexedd.ui.BetterGridView.java
com.nav.dexedd.ui.BetterScrollView.java
com.nav.dexedd.ui.LabelView.java
com.nav.dexedd.ui.SquareImageView.java
com.nav.dexedd.ui.TreeLayout.java
com.nav.dexedd.ui.TypeTagView.java
com.nav.dexedd.util.AssetUtil.java
com.nav.dexedd.util.ConversionUtil.java
com.nav.dexedd.util.PokemonTextUtil.java
com.nav.dexedd.util.TypeUtil.java