public Selector limit(Constant constant) { if (constant instanceof IntConstant || constant instanceof LongConstant) { limit = constant; return this; } else { throw new UnsupportedAttributeTypeException("'limit' only supports int or long constants, but found '" + constant + "'"); } }
public Selector offset(Constant constant) { if (constant instanceof IntConstant || constant instanceof LongConstant) { offset = constant; return this; } else { throw new UnsupportedAttributeTypeException("'offset' only supports int or long constants, but found '" + constant + "'"); } } public List<OutputAttribute> getSelectionList() {
public static EventOutputRate perEvents(Constant events) { if (events instanceof LongConstant) { return new EventOutputRate(((LongConstant) events).getValue().intValue()); } else if (events instanceof IntConstant) { return new EventOutputRate(((IntConstant) events).getValue()); } throw new UnsupportedAttributeTypeException("Unsupported output event rate type, output event rate only " + "supports int"); }
public Selector limit(Constant constant) { if (constant instanceof IntConstant || constant instanceof LongConstant) { limit = constant; return this; } else { throw new UnsupportedAttributeTypeException("'limit' only supports int or long constants, but found '" + constant + "'"); } }
public Selector offset(Constant constant) { if (constant instanceof IntConstant || constant instanceof LongConstant) { offset = constant; return this; } else { throw new UnsupportedAttributeTypeException("'offset' only supports int or long constants, but found '" + constant + "'"); } } public List<OutputAttribute> getSelectionList() {
public static EventOutputRate perEvents(Constant events) { if (events instanceof LongConstant) { return new EventOutputRate(((LongConstant) events).getValue().intValue()); } else if (events instanceof IntConstant) { return new EventOutputRate(((IntConstant) events).getValue()); } throw new UnsupportedAttributeTypeException("Unsupported output event rate type, output event rate only " + "supports int"); }