com.unbxd.client.search.response.Stats Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of unbxd-java-sdk Show documentation
Show all versions of unbxd-java-sdk Show documentation
The project is a Unbxd Java Library
The newest version!
package com.unbxd.client.search.response;
import java.util.HashMap;
import java.util.Map;
/**
* Created with IntelliJ IDEA.
* User: sourabh
* Date: 08/07/14
* Time: 11:03 AM
* To change this template use File | Settings | File Templates.
*/
public class Stats {
private Map _stats;
protected Stats(Map params){
this._stats = new HashMap();
for(String field : params.keySet()){
if(params.get(field) != null)
this._stats.put(field, new Stat((Map) params.get(field)));
}
}
/**
* @return Map of Field --> {@link Stat}
*/
public Map getStats(){
return this._stats;
}
/**
* @param fieldName
* @return Stat for the field name
*/
public Stat getStat(String fieldName){
return this._stats.get(fieldName);
}
}