toString
This commit is contained in:
@@ -19,12 +19,26 @@ public class ASD_Turtle implements TurtleASD {
|
||||
}
|
||||
}
|
||||
record PhraseImp(EntityImp entity, List<AffectationImp> affs) implements Phrase{}
|
||||
record AffectationImp(EntityImp entity, List<Complement> complements) implements Affectation{}
|
||||
record Complement_EntityImp(EntityImp entity) implements Complement{}
|
||||
record AffectationImp(EntityImp entity, List<Complement> complements) implements Affectation{
|
||||
public String toString(){
|
||||
String str= "< " + this.entity.toString() + " >";
|
||||
for (int i =0; i < this.complements.size(); i++) {
|
||||
str += (this.complements.get(i));
|
||||
if (i < this.complements.size() - 1) {
|
||||
str += ", ";
|
||||
}
|
||||
}
|
||||
return str + ";";
|
||||
}
|
||||
}
|
||||
record Complement_EntityImp(EntityImp entity) implements Complement{
|
||||
public String toString(){
|
||||
return " < " + this.entity.toString() + " >";
|
||||
}
|
||||
}
|
||||
record Complement_TextImp(String string) implements Complement{
|
||||
public String toString(){
|
||||
return " \" " + this.string + " \"";
|
||||
|
||||
}
|
||||
}
|
||||
record EntityImp(String string) implements Entity{
|
||||
|
||||
Reference in New Issue
Block a user