public void Repurpose(AdvanceableRule target) { Clear(); Repurpose(target.name); // if(!target.Name.Equals(Name)) // Name = target.Name; for (int i = 0; i < target.Count; i++) { Add(target[i]); } }
public AdvanceableRule(AdvanceableRule rule) { #if GATHERING_STATS InstanceCount++; // bornOn = DateTime.Now; #endif name = rule.name; for (int i = 0; i < rule.Count; i++) { Add(rule[i]); //lets see what this does... } }
public void Repurpose(string lookahead, AdvanceableRule r) { Clear(); if (!r.Name.Equals(base.Name)) { base.Name = r.Name; } if (!lookahead.Equals(LookaheadSymbol)) { lookaheadSymbol = lookahead; } for (int i = 0; i < r.Count; i++) { Add(r[i]); } }
protected bool Equals(AdvanceableRule rr) { if (!rr.name.Equals(name) || rr.Count != Count) { return(false); } else { for (int i = 0; i < Count; i++) { if (!this[i].Equals(rr[i])) { return(false); } } return(true); } }
int IEqualityComparer <AdvanceableRule> .GetHashCode(AdvanceableRule x) { return(x.GetHashCode0()); }
bool IEqualityComparer <AdvanceableRule> .Equals(AdvanceableRule x, AdvanceableRule y) { return(x.Equals(y)); }
public override bool Equals(object other) { AdvanceableRule rr = (AdvanceableRule)other; return(Equals(rr)); }
bool IAdvanceableRule.Equals(object other) { AdvanceableRule rr = (AdvanceableRule)other; return(Equals(rr)); }
public LookaheadRule(string lookaheadSymbol, AdvanceableRule rule) : base(rule) { this.lookaheadSymbol = lookaheadSymbol; }