forked from JavaTX/JavaCompilerCore
27 lines
652 B
Java
27 lines
652 B
Java
|
package mycompiler.myparser;
|
||
|
|
||
|
import java.util.Vector;
|
||
|
|
||
|
import typinferenz.exceptions.DebugException;
|
||
|
import mycompiler.mytype.GenericTypeVar;
|
||
|
|
||
|
public class GenericVarDeclarationList {
|
||
|
|
||
|
private Vector<GenericTypeVar> elements = new Vector<>();
|
||
|
|
||
|
public void addElement(GenericTypeVar e){
|
||
|
elements.addElement(e);
|
||
|
}
|
||
|
|
||
|
public int getEndOffset() {
|
||
|
int ret;
|
||
|
if(elements.isEmpty())throw new DebugException("Es wurde eine GenericVarDeclarationList ohne Elemente geparst");
|
||
|
ret = elements.lastElement().getOffset() + elements.lastElement().getName().length();
|
||
|
return ret;
|
||
|
}
|
||
|
|
||
|
public Vector<GenericTypeVar> getElements(){
|
||
|
return elements;
|
||
|
}
|
||
|
}
|