net.acesinc.data.binner.LiteralBinner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of data-binner Show documentation
Show all versions of data-binner Show documentation
A generic tool to sort data into bins that can later be counted
The newest version!
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package net.acesinc.data.binner;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author andrewserff
*/
public class LiteralBinner extends Binner {
public LiteralBinner(String countName) {
super(countName);
}
public LiteralBinner(String countName, String dataFieldName) {
super(countName, dataFieldName);
}
@Override
protected List generateBinNamesForData(Object value) {
List binNames = new ArrayList<>();
binNames.add(getBinName() + "." + value);
return binNames;
}
}