![JAR search and dependency download from the Maven repository](/logo.png)
org.ggp.base.util.assignments.SimpleAssignmentStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alloy-ggp-base Show documentation
Show all versions of alloy-ggp-base Show documentation
A modified version of the GGP-Base library for Alloy.
The newest version!
package org.ggp.base.util.assignments;
import java.util.List;
import org.ggp.base.util.gdl.grammar.GdlConstant;
import com.google.common.collect.ImmutableList;
public class SimpleAssignmentStrategy implements AssignmentStrategy {
private final ImmutableList definedIndices;
private final ImmutableList> partialAssignments;
public SimpleAssignmentStrategy(ImmutableList definedIndices,
ImmutableList> partialAssignments) {
this.definedIndices = definedIndices;
this.partialAssignments = partialAssignments;
}
public static SimpleAssignmentStrategy create(List definedIndices,
List> partialAssignments) {
return new SimpleAssignmentStrategy(
ImmutableList.copyOf(definedIndices),
ImmutableList.copyOf(partialAssignments));
}
@Override
public List getDependentIndices() {
return ImmutableList.of();
}
@Override
public List getDefinedIndices() {
return definedIndices;
}
@Override
public List extends List> getPartialAssignments(
List inputs) {
return partialAssignments;
}
@Override
public int getRejectedIndex(List inputs) {
return NO_INDEX_REJECTED;
}
@Override
public String toString() {
return "SimpleAssignmentStrategy [definedIndices=" + definedIndices
+ ", partialAssignments=" + partialAssignments + "]";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy