org.joinedworkz.common.info.ComponentInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common-base Show documentation
Show all versions of common-base Show documentation
DSL based modeling framework - facilities common base
package org.joinedworkz.common.info;
public class ComponentInfo {
private final Integer id;
private int usedOrderNumber = 0;
public ComponentInfo(Integer id) {
this.id = id;
}
public Integer getId() {
return id;
}
public boolean isUsed() {
return usedOrderNumber > 0;
}
public int getUsedOrderNumber() {
return usedOrderNumber;
}
public void checkAndAssignUsedOrderNumber(int usedOrderNumber) {
if (this.usedOrderNumber == 0) {
this.usedOrderNumber = usedOrderNumber;
}
}
}