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

uk.co.openkappa.bitrules.config.IntAttribute Maven / Gradle / Ivy

There is a newer version: 0.1.7
Show newest version
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);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy