summaryrefslogtreecommitdiffstats
path: root/java/src/hdf/hdf5lib/structs
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/hdf/hdf5lib/structs')
-rw-r--r--java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java36
-rw-r--r--java/src/hdf/hdf5lib/structs/H5O_info_t.java4
-rw-r--r--java/src/hdf/hdf5lib/structs/H5_ih_info_t.java18
3 files changed, 55 insertions, 3 deletions
diff --git a/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java b/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java
index a39c1ed..8d0cc24 100644
--- a/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java
+++ b/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java
@@ -16,7 +16,7 @@ package hdf.hdf5lib.structs;
import java.io.Serializable;
// Information struct for object header metadata (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx)
-public class H5O_hdr_info_t implements Serializable{
+public class H5O_hdr_info_t implements Serializable {
private static final long serialVersionUID = 7883826382952577189L;
public int version; /* Version number of header format in file */
public int nmesgs; /* Number of object header messages */
@@ -44,4 +44,38 @@ public class H5O_hdr_info_t implements Serializable{
this.mesg_present = mesg_present;
this.mesg_shared = mesg_shared;
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+
+ if (!(o instanceof H5O_hdr_info_t))
+ return false;
+
+ H5O_hdr_info_t info = (H5O_hdr_info_t) o;
+
+ if (this.version != info.version)
+ return false;
+ if (this.nmesgs != info.nmesgs)
+ return false;
+ if (this.nchunks != info.nchunks)
+ return false;
+ if (this.flags != info.flags)
+ return false;
+ if (this.space_total != info.space_total)
+ return false;
+ if (this.space_meta != info.space_meta)
+ return false;
+ if (this.space_mesg != info.space_mesg)
+ return false;
+ if (this.space_free != info.space_free)
+ return false;
+ if (this.mesg_present != info.mesg_present)
+ return false;
+ if (this.mesg_shared != info.mesg_shared)
+ return false;
+
+ return true;
+ }
}
diff --git a/java/src/hdf/hdf5lib/structs/H5O_info_t.java b/java/src/hdf/hdf5lib/structs/H5O_info_t.java
index ac32f6a..5dd078f 100644
--- a/java/src/hdf/hdf5lib/structs/H5O_info_t.java
+++ b/java/src/hdf/hdf5lib/structs/H5O_info_t.java
@@ -15,8 +15,8 @@ package hdf.hdf5lib.structs;
import java.io.Serializable;
-//Information struct for object (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx)
-public class H5O_info_t implements Serializable{
+// Information struct for object (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx)
+public class H5O_info_t implements Serializable {
private static final long serialVersionUID = 4691681163544054518L;
public long fileno; /* File number that object is located in */
public long addr; /* Object address in file */
diff --git a/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java b/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java
index ea36d85..7159f02 100644
--- a/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java
+++ b/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java
@@ -26,4 +26,22 @@ public class H5_ih_info_t implements Serializable {
this.index_size = index_size;
this.heap_size = heap_size;
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+
+ if (!(o instanceof H5_ih_info_t))
+ return false;
+
+ H5_ih_info_t info = (H5_ih_info_t) o;
+
+ if (this.index_size != info.index_size)
+ return false;
+ if (this.heap_size != info.heap_size)
+ return false;
+
+ return true;
+ }
}