/// If the fact isn't part of the list, it is inserted. Called by iThinkFact::applyFact() public void addFact( iThinkFact fact ) { foreach ( iThinkFact _fact in this.facts ) { if ( _fact == fact ) return; } facts.Add( fact ); }
/// If the fact is part of the list, it is deleted. Called by iThinkFact::applyFact() public void delFact(iThinkFact fact) { foreach (iThinkFact _fact in this.facts) { if (_fact == fact) { facts.Remove(_fact); break; } } }
/// If the fact isn't part of the list, it is inserted. Called by iThinkFact::applyFact() public void addFact(iThinkFact fact) { foreach (iThinkFact _fact in this.facts) { if (_fact == fact) { return; } } facts.Add(fact); }
public override bool Equals(object obj) { iThinkFact other = obj as iThinkFact; if (other == null) { return(false); } return(this.Equals((iThinkFact)obj)); }
/// If the fact is part of the list, it is deleted. Called by iThinkFact::applyFact() public void delFact( iThinkFact fact ) { foreach ( iThinkFact _fact in this.facts ) { if ( _fact == fact ) { facts.Remove( _fact ); break; } } }
public bool Equals(iThinkFact fact2) { if (!this.getName().Equals(fact2.getName())) { return(false); } if (this.objects.Count != fact2.objects.Count) { return(false); } for (int i = 0; i < this.objects.Count; i++) { if (!this.getObj(i).Equals(fact2.getObj(i))) { return(false); } } return(true); }
public bool Equals(iThinkFact fact2) { if ( !this.getName().Equals( fact2.getName() ) ) return false; if ( this.objects.Count != fact2.objects.Count ) return false; for ( int i = 0 ; i < this.objects.Count ; i++ ) { if ( !this.getObj( i ).Equals(fact2.getObj( i )) ) return false; } return true; }