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

dev.struchkov.godfather.main.domain.UnitDefinition Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version
package dev.struchkov.godfather.main.domain;

import java.lang.reflect.Method;
import java.util.HashSet;
import java.util.Set;

public class UnitDefinition {

    private final Set nextUnitNames = new HashSet<>();
    private final Set dependentUnits = new HashSet<>();

    private String name;
    private Object objectConfig;
    private Method method;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Object getObjectConfig() {
        return objectConfig;
    }

    public void setObjectConfig(Object objectConfig) {
        this.objectConfig = objectConfig;
    }

    public Method getMethod() {
        return method;
    }

    public void setMethod(Method method) {
        this.method = method;
    }

    public Set getNextUnitNames() {
        return new HashSet<>(nextUnitNames);
    }

    public void setNextUnitNames(Set nextUnitNames) {
        this.nextUnitNames.addAll(nextUnitNames);
    }

    public void setNextUnitName(String nextUnitName) {
        this.nextUnitNames.add(nextUnitName);
    }

    public void removeNextUnit(String nextUnitName) {
        this.nextUnitNames.remove(nextUnitName);
    }

    public void removeDependentUnit(String dependentUnitName) {
        this.dependentUnits.remove(dependentUnitName);
    }

    public Set getDependentUnits() {
        return new HashSet<>(dependentUnits);
    }

    public void setDependentUnits(Set dependentUnitNames) {
        this.dependentUnits.addAll(dependentUnitNames);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy