
eu.interedition.text.h2.AnchorRelation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of text-core Show documentation
Show all versions of text-core Show documentation
Stand-off Markup/Annotation Text Model
The newest version!
package eu.interedition.text.h2;
import com.google.common.base.Objects;
import eu.interedition.text.Anchor;
import eu.interedition.text.Layer;
import eu.interedition.text.Text;
import eu.interedition.text.TextRange;
/**
* @author Gregor Middell
*/
public class AnchorRelation extends Anchor {
private final long id;
public AnchorRelation(Layer text, TextRange range, long id) {
super(text, range);
this.id = id;
}
public long getId() {
return id;
}
@Override
public int hashCode() {
return Objects.hashCode(id);
}
@Override
public boolean equals(Object obj) {
if (obj != null && obj instanceof AnchorRelation) {
return id == ((AnchorRelation) obj).id;
}
return super.equals(obj);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy