All Downloads are FREE. Search and download functionalities are using the official Maven repository.

simple.server.core.rule.EntityManager Maven / Gradle / Ivy

The newest version!

package simple.server.core.rule;

import java.util.Collection;
import simple.server.core.entity.Entity;
import simple.server.core.entity.item.Item;
import simple.server.core.rule.defaultruleset.DefaultItem;

/**
 * Ruleset Interface for resolving Entities.
 * 
 * @author Matthias Totz
 */
public interface EntityManager {

    boolean addItem(DefaultItem item);

    /**
     * Return a list of all Items that are being used at least once.
     *
     * @return
     */
    Collection getItems();

    /**
     * Return the entity or null if the class is unknown.
     *
     * @param clazz
     *            the creature class, must not be null
     * @return the entity or null
     *
     */
    Entity getEntity(String clazz);

    /**
     * Return true if the Entity is a Item.
     *
     * @param clazz
     *            the Item class, must not be null
     * @return true if it is a Item, false otherwise
     *
     */
    boolean isItem(String clazz);

    /**
     * Return the item or null if the clazz is unknown.
     *
     * @param clazz
     *            the item class, must not be null
     * @return the item or null
     *
     */
    Item getItem(String clazz);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy