io.keen.client.java.result.QueryResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of keen-client-api-query Show documentation
Show all versions of keen-client-api-query Show documentation
Java Query Client API for Keen IO
package io.keen.client.java.result;
import java.util.List;
import java.util.Map;
/**
* This abstract class represents the object returned by a Keen Query.
* By default, all methods with boolean return values are set to return false,
* and all getter methods are set to throw IllegalStateException.
*
* It is the responsibility of subclasses to return true and get the
* appropriate object.
*
* @author claireyoung
* @since 1.0.0, 07/06/15
*/
public abstract class QueryResult {
/**
* @return {@code false}
*/
public boolean isDouble() {
return false;
}
/**
* @return {@code false}
*/
public boolean isLong() {
return false;
}
/**
* @return {@code false}
*/
public boolean isString() {
return false;
}
/**
* @return {@code false}
*/
public boolean isListResult() {
return false;
}
/**
* @return {@code false}
*/
public boolean isIntervalResult() {
return false;
}
/**
* @return {@code false}
*/
public boolean isGroupResult() { return false; }
/**
* @return doubleValue, which is IllegalStateException in abstract class.
*/
public double doubleValue() {
throw new IllegalStateException();
}
/**
* @return longValue, which is IllegalStateException in abstract class.
*/
public long longValue() {
throw new IllegalStateException();
}
/**
* @return stringValue, which is IllegalStateException in abstract class.
*/
public String stringValue() {
throw new IllegalStateException();
}
/**
* @return list results, which is IllegalStateException in abstract class.
*/
public List getListResults() {
throw new IllegalStateException();
}
/**
* @return map of AbsoluteTimeframe to QueryResult's, which is IllegalStateException in
* abstract class.
*/
public List getIntervalResults() { throw new IllegalStateException(); }
/**
* @return map of Group to QueryResult's, which is IllegalStateException in abstract class.
*/
public Map getGroupResults() { throw new IllegalStateException(); }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy