- public void set_number_of_blocks(QueryChannelRange this_ptr, int val) {
- bindings.QueryChannelRange_set_number_of_blocks(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
- this.ptrs_to.add(this_ptr);
+ /**
+ * The number of blocks to include in the query results
+ */
+ public void set_number_of_blocks(int val) {
+ bindings.QueryChannelRange_set_number_of_blocks(this.ptr, val);
+ }
+
+ /**
+ * Constructs a new QueryChannelRange given each field
+ */
+ public static QueryChannelRange of(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg) {
+ long ret = bindings.QueryChannelRange_new(chain_hash_arg, first_blocknum_arg, number_of_blocks_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ QueryChannelRange ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new QueryChannelRange(null, ret); }
+ ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ return ret_hu_conv;