Unnamed
public text v1 · immutable
import java.io.*;
import java.lang.*;
class Token
{
String token = null;
public Token(String theString){
token = theString;
}
boolean isLabel(){
return (token.startsWith("<") && (token.indexOf(">")!=-1))?true:false;
}
String readLabel(){
return (this.isLabel())?token.substring(token.indexOf("<")+1,token.indexOf(">")-1):null;
}
boolean isEndLabel(){
if (!this.readLabel()){
System.out.println("einai null");
System.exit(0);
}
return token.substring(1).startsWith("/");
}
}