strangedb/src/main/java/org/warp/jcwdb/IndexDetails.java

59 lines
1.0 KiB
Java

package org.warp.jcwdb;
import java.util.Objects;
public class IndexDetails {
private final long offset;
private final int size;
private final int type;
public IndexDetails(long offset, int size, int type) {
this.offset = offset;
this.size = size;
this.type = type;
}
public IndexDetails(IndexDetails indexDetails) {
this.offset = indexDetails.offset;
this.size = indexDetails.size;
this.type = indexDetails.type;
}
public long getOffset() {
return offset;
}
public int getSize() {
return size;
}
public int getType() {
return type;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
IndexDetails that = (IndexDetails) o;
return offset == that.offset &&
size == that.size &&
type == that.type;
}
@Override
public int hashCode() {
return Objects.hash(offset);
}
@Override
public String toString() {
return "IndexDetails{" +
"offset=" + offset +
", size=" + size +
", type=" + type +
'}';
}
}