1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class GossipTimestampFilter extends CommonBase {
10 GossipTimestampFilter(Object _dummy, long ptr) { super(ptr); }
11 @Override @SuppressWarnings("deprecation")
12 protected void finalize() throws Throwable {
14 if (ptr != 0) { bindings.GossipTimestampFilter_free(ptr); }
17 public GossipTimestampFilter clone() {
18 long ret = bindings.GossipTimestampFilter_clone(this.ptr);
19 GossipTimestampFilter ret_hu_conv = new GossipTimestampFilter(null, ret);
20 ret_hu_conv.ptrs_to.add(this);
24 public byte[] get_chain_hash() {
25 byte[] ret = bindings.GossipTimestampFilter_get_chain_hash(this.ptr);
29 public void set_chain_hash(byte[] val) {
30 bindings.GossipTimestampFilter_set_chain_hash(this.ptr, val);
33 public int get_first_timestamp() {
34 int ret = bindings.GossipTimestampFilter_get_first_timestamp(this.ptr);
38 public void set_first_timestamp(int val) {
39 bindings.GossipTimestampFilter_set_first_timestamp(this.ptr, val);
42 public int get_timestamp_range() {
43 int ret = bindings.GossipTimestampFilter_get_timestamp_range(this.ptr);
47 public void set_timestamp_range(int val) {
48 bindings.GossipTimestampFilter_set_timestamp_range(this.ptr, val);
51 public static GossipTimestampFilter constructor_new(byte[] chain_hash_arg, int first_timestamp_arg, int timestamp_range_arg) {
52 long ret = bindings.GossipTimestampFilter_new(chain_hash_arg, first_timestamp_arg, timestamp_range_arg);
53 GossipTimestampFilter ret_hu_conv = new GossipTimestampFilter(null, ret);
54 ret_hu_conv.ptrs_to.add(ret_hu_conv);
58 public static Result_GossipTimestampFilterDecodeErrorZ constructor_read(byte[] ser) {
59 long ret = bindings.GossipTimestampFilter_read(ser);
60 Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
64 public byte[] write() {
65 byte[] ret = bindings.GossipTimestampFilter_write(this.ptr);