public KifExplicitRelationalSentence(KifSequence <KifTerm> terms, KifSequenceVariable variable) : base(new KifConstant(CONSTANT_NAME), terms, variable)
 {
     if (terms.isEmpty())
     {
         throw new ArgumentException("Sequence of terms cann't be empty");
     }
 }
 private static KifSequence <KifTerm> checkSeqTerm(KifSequence <KifTerm> termSeq)
 {
     if (termSeq == null || termSeq.isEmpty())
     {
         throw new ArgumentException("Sequence of terms cann't be null or empty");
     }
     return(termSeq);
 }
 public KifRelationalSentence(KifConstant constant, KifSequence <KifTerm> terms, KifSequenceVariable variable)
 {
     if (constant == null)
     {
         throw new ArgumentNullException("Constant cann't be null");
     }
     _constant = constant;
     _variable = variable;
     _terms    = new KifSequence <KifTerm>(terms);
 }
示例#4
0
 public KifDefinition(string name, string str, KifSequence <KifSentence> sentences)
 {
     if (StringUtils.isEmpty(name))
     {
         throw new ArgumentException("name cann't be null or empty");
     }
     if (sentences == null || sentences.isEmpty())
     {
         throw new ArgumentException("list of sentences cann't be null or empty");
     }
     _name      = name;
     _string    = str;
     _sentences = new KifSequence <KifSentence>(sentences);
 }
 public KifExplicitFunctionalTerm(KifSequence <KifTerm> termSeq, KifSequenceVariable sequenceVariable) : base(CONSTANT_NAME, checkSeqTerm(termSeq), sequenceVariable)
 {
 }
示例#6
0
 public virtual void addRange(KifSequence <T> seq) //TODO:
 {
     _content.AddRange(seq._content);
 }
示例#7
0
 public KifSequence(KifSequence <T> seq)
 {
     _content = new List <T>(seq._content);
 }
示例#8
0
 public KifSequence(KifSequence <T> seq, T obj) : this(seq) {
     addItem(obj);
 }
示例#9
0
 public KifSequence(T obj, KifSequence <T> seq) : this(obj) {
     addRange(seq);
 }
示例#10
0
 public KifRelSent(String relreadonly, KifSequence <KifObject> termSeq)
 {
     _relreadonly = relreadonly;
     _termSeq     = termSeq;
 }
示例#11
0
 public KifRelSent(String relreadonly)
 {
     _relreadonly = relreadonly;
     _termSeq     = null;
 }
 public KifExplicitRelationalSentence(KifSequence <KifTerm> terms)
     : base(new KifConstant(CONSTANT_NAME), terms)
 {
 }
 public KifRelationalSentence(KifConstant constant, KifSequence <KifTerm> terms) : this(constant, terms, null)
 {
 }
示例#14
0
 public KifImplication(KifSentence consequent, KifSequence <KifSentence> antecedents)
 {
     _antecedents = antecedents;
     _consequent  = consequent;
 }
 public KifFunctionalTerm(String constantName, KifSequence <KifTerm> termSeq, KifSequenceVariable sequenceVariable) : base(constantName)
 {
     _termSeq     = new KifSequence <KifTerm>(termSeq);
     _sequenceVar = sequenceVariable;
 }
示例#16
0
 protected KifDefinition(string name, KifSequence <KifSentence> sentences)
     : this(name, null, sentences)
 {
 }