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 byte[] get_chain_hash() {
18 byte[] ret = bindings.GossipTimestampFilter_get_chain_hash(this.ptr);
22 public void set_chain_hash(byte[] val) {
23 bindings.GossipTimestampFilter_set_chain_hash(this.ptr, val);
26 public int get_first_timestamp() {
27 int ret = bindings.GossipTimestampFilter_get_first_timestamp(this.ptr);
31 public void set_first_timestamp(int val) {
32 bindings.GossipTimestampFilter_set_first_timestamp(this.ptr, val);
35 public int get_timestamp_range() {
36 int ret = bindings.GossipTimestampFilter_get_timestamp_range(this.ptr);
40 public void set_timestamp_range(int val) {
41 bindings.GossipTimestampFilter_set_timestamp_range(this.ptr, val);
44 public static GossipTimestampFilter constructor_new(byte[] chain_hash_arg, int first_timestamp_arg, int timestamp_range_arg) {
45 long ret = bindings.GossipTimestampFilter_new(chain_hash_arg, first_timestamp_arg, timestamp_range_arg);
46 GossipTimestampFilter ret_hu_conv = new GossipTimestampFilter(null, ret);
47 ret_hu_conv.ptrs_to.add(ret_hu_conv);
51 public GossipTimestampFilter clone() {
52 long ret = bindings.GossipTimestampFilter_clone(this.ptr);
53 GossipTimestampFilter ret_hu_conv = new GossipTimestampFilter(null, ret);
54 ret_hu_conv.ptrs_to.add(this);
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);