Inheritance: ComplexSentence
 public Object visitMultiSentence(MultiSentence fs, Object arg)
 {
     List<Sentence> terms = fs.getSentences();
     List<Sentence> newTerms = new List<Sentence>();
     for (int i = 0; i < terms.Count; i++)
     {
         Sentence s = (Sentence)terms[i];
         Sentence subsTerm = (Sentence)s.accept(this, arg);
         newTerms.Add(subsTerm);
     }
     return new MultiSentence(fs.getOperator(), newTerms);
 }
Beispiel #2
0
        public override bool Equals(Object o)
        {
            if (this == o)
            {
                return(true);
            }
            if ((o == null) || !(o is MultiSentence))
            {
                return(false);
            }
            MultiSentence sen = (MultiSentence)o;

            return((sen.getOperator().Equals(getOperator())) && (sen
                                                                 .getSentences().Equals(getSentences())));
        }
Beispiel #3
0
 public virtual Object visitMultiSentence(MultiSentence fs, Object arg)
 {
     throw new ApplicationException("Can't handle MultiSentence");
 }
Beispiel #4
0
 public Object visitMultiSentence(MultiSentence fs, Object arg)
 {
     throw new ApplicationException("can't handle multisentences");
 }
Beispiel #5
0
	public Object visitMultiSentence(MultiSentence fs, Object argd) {
		// TODO remove this?
		return null;
	}