uk.co.openkappa.bitrules.config.IntAttribute Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bitrules Show documentation
Show all versions of bitrules Show documentation
Rule based classification with explicit support for ambiguity resolution
package uk.co.openkappa.bitrules.config;
import uk.co.openkappa.bitrules.Rule;
import uk.co.openkappa.bitrules.nodes.IntRule;
import java.util.function.ToIntFunction;
/**
* Creates a column of constraints with integer semantics
* @param the type of the classified objects
*/
public class IntAttribute implements Attribute {
private final ToIntFunction accessor;
IntAttribute(ToIntFunction accessor) {
this.accessor = accessor;
}
@Override
public Rule toRule() {
return new IntRule<>(accessor);
}
}