All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vladsch.flexmark.util.sequence.builder.tree.SegmentTreePos Maven / Gradle / Ivy

There is a newer version: 0.64.8
Show newest version
package com.vladsch.flexmark.util.sequence.builder.tree;

final public class SegmentTreePos {
    final public int pos;
    final public int startIndex;
    final public int iterations;

    public SegmentTreePos(int pos, int startIndex, int iterations) {
        this.pos = pos;
        this.startIndex = startIndex;
        this.iterations = iterations;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof SegmentTreePos)) return false;

        SegmentTreePos pos1 = (SegmentTreePos) o;

        if (pos != pos1.pos) return false;
        return startIndex == pos1.startIndex;
    }

    @Override
    public int hashCode() {
        int result = pos;
        result = 31 * result + startIndex;
        return result;
    }

    @Override
    public String toString() {
        return "{" + pos + ", s: " + startIndex + ", i: " + iterations + '}';
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy