Package transientlibs.bindedobjects.core.datasets

Source Code of transientlibs.bindedobjects.core.datasets.EquipmentSlots

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package transientlibs.bindedobjects.core.datasets;

import java.util.ArrayList;
import transientlibs.bindedobjects.core.Binding;
import transientlibs.bindedobjects.core.datasets.LesserBindedValue;
import transientlibs.bindedobjects.core.loaders.EquipmentSlotsLoader;

/**
*
* @author kibertoad
*/
public class EquipmentSlots extends LesserBindedValue {

    public String code;
    public int bodyPart;
   
    //public static ArrayList<EquipmentSlots> equipmentSlots = new ArrayList<EquipmentSlots>();
    //public static EquipmentSlots lastEquipmentSlots;
   
    public static LesserBindedValueContainer<EquipmentSlots> container = new LesserBindedValueContainer<EquipmentSlots>(Binding.equipmentSlotBinding);

    public static void loadEquipmentSlots() {
        EquipmentSlotsLoader loader = new EquipmentSlotsLoader (container);
        loader.loadEquipmentSlots();
      
    }

   


    public static EquipmentSlots getEquipmentSlotsByID(int getCode) {

        for (EquipmentSlots e : container.elements) {
            if (e.ID == getCode) {
                return e;
            }
        }

        return null;
    }

    public static EquipmentSlots getEquipmentSlotsByCode(String byCode) {
        return getEquipmentSlotsByID(Binding.readBinding(Binding.equipmentSlotBinding, byCode.toLowerCase()));
    }
}
TOP

Related Classes of transientlibs.bindedobjects.core.datasets.EquipmentSlots

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.