![JAR search and dependency download from the Maven repository](/logo.png)
de.julielab.geneexpbase.genemodel.AcronymLongform Maven / Gradle / Ivy
package de.julielab.geneexpbase.genemodel;
import de.julielab.java.utilities.spanutils.Span;
import org.apache.commons.lang3.Range;
import java.util.ArrayList;
import java.util.List;
public class AcronymLongform implements Span {
private String text;
private Range offsets;
private final List acronyms;
public AcronymLongform(String text, int begin, int end) {
this();
this.text = text;
this.offsets = Range.between(begin, end);
}
public AcronymLongform() {
this.acronyms = new ArrayList<>();
}
@Override
public String toString() {
return "AcronymLongform [text=" + text + ", offsets=" + offsets + "]";
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public Range getOffsets() {
return offsets;
}
public void setOffsets(Range offsets) {
this.offsets = offsets;
}
@Override
public int getBegin() {
return offsets.getMinimum();
}
@Override
public int getEnd() {
return offsets.getMaximum();
}
public List getAcronyms() {
return acronyms;
}
public void addAcronym(Acronym acronym) {
this.acronyms.add(acronym);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy