Fix bad interface naming
This commit is contained in:
@@ -19,7 +19,7 @@ package tenor;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class AquireCraftingItems extends QuantizedTaskNode implements ClaimProvider {
|
public class AquireCraftingItems extends QuantizedTaskNode implements IClaimProvider {
|
||||||
|
|
||||||
final CraftingTask parent;
|
final CraftingTask parent;
|
||||||
final QuantizedToQuantizedTaskRelationship parentRelationship;
|
final QuantizedToQuantizedTaskRelationship parentRelationship;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class AquireItemTask extends QuantizedTaskNode implements ClaimProvider, IQuantizedDependentCostCalculator<IQuantizedChildTaskRelationship> {
|
public class AquireItemTask extends QuantizedTaskNode implements IClaimProvider, IQuantizedDependentCostCalculator<IQuantizedChildTaskRelationship> {
|
||||||
|
|
||||||
HashMap<IQuantizedChildTaskRelationship, Integer> allocation; // allocation of what tasks have claim over what items in our inventory i guess
|
HashMap<IQuantizedChildTaskRelationship, Integer> allocation; // allocation of what tasks have claim over what items in our inventory i guess
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
package tenor;
|
package tenor;
|
||||||
|
|
||||||
public interface ClaimProvider {
|
public interface IClaimProvider {
|
||||||
|
|
||||||
int quantityCompletedForParent(IQuantizedChildTaskRelationship relationship);
|
int quantityCompletedForParent(IQuantizedChildTaskRelationship relationship);
|
||||||
}
|
}
|
||||||
@@ -27,6 +27,6 @@ public interface IQuantizedChildTaskRelationship<T extends ITaskNodeBase> extend
|
|||||||
|
|
||||||
default int quantityCompleted() {
|
default int quantityCompleted() {
|
||||||
// TODO: Resolve this cast, should QuantizedTask implement ClaimProvider?
|
// TODO: Resolve this cast, should QuantizedTask implement ClaimProvider?
|
||||||
return ((ClaimProvider) childTask()).quantityCompletedForParent(this);
|
return ((IClaimProvider) childTask()).quantityCompletedForParent(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public abstract class QuantizedTaskNode extends TaskNode<IQuantizedChildTaskRela
|
|||||||
int minQuantity = -1;
|
int minQuantity = -1;
|
||||||
for (int i = 0; i < childTasks().indexOf(child); i++) {
|
for (int i = 0; i < childTasks().indexOf(child); i++) {
|
||||||
QuantizedToQuantizedTaskRelationship relationship = (QuantizedToQuantizedTaskRelationship) childTasks().get(i);
|
QuantizedToQuantizedTaskRelationship relationship = (QuantizedToQuantizedTaskRelationship) childTasks().get(i);
|
||||||
ClaimProvider claim = (ClaimProvider) relationship.childTask();
|
IClaimProvider claim = (IClaimProvider) relationship.childTask();
|
||||||
int amt = claim.quantityCompletedForParent(relationship);
|
int amt = claim.quantityCompletedForParent(relationship);
|
||||||
if (minQuantity == -1 || amt < minQuantity) {
|
if (minQuantity == -1 || amt < minQuantity) {
|
||||||
minQuantity = amt;
|
minQuantity = amt;
|
||||||
|
|||||||
Reference in New Issue
Block a user