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

com.blazebit.ai.decisiontree.impl.NoopDecisionTree Maven / Gradle / Ivy

There is a newer version: 0.1.21
Show newest version
package com.blazebit.ai.decisiontree.impl;

import com.blazebit.ai.decisiontree.DecisionTree;
import com.blazebit.ai.decisiontree.Item;

import java.util.HashSet;
import java.util.Set;

/**
 * @author Christian Beikov
 */
public class NoopDecisionTree implements DecisionTree {

    private final T value;

    public NoopDecisionTree(T value) {
        this.value = value;
    }

    @Override
    public Set apply(final Item test) {
        Set set = new HashSet();
        set.add(value);
        return set;
    }

    @Override
    public T applySingle(final Item test) {
        return value;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy