public override bool Equals(object obj) { if (obj is RefX1 <T> ) { RefX1 <T> v = (RefX1 <T>)obj; return(CompareTo(v) == 0); } return(false); }
public int CompareTo(RefX1 <T> obj) { if (null == obj) { return(1); } if (null == _val) { if (null == obj.Val) { return(0); } else { return(-1); } } return(_val.CompareTo(obj.Val)); }
private static RefX1 <int>[] PrepTests(RefX1IntGenerator generator, int count, out RefX1 <int>[] toRemove, out RefX1 <int>[] afterRemove) { RefX1 <int>[] entireArray = new RefX1 <int> [count]; toRemove = new RefX1 <int> [count / 2]; afterRemove = new RefX1 <int> [count / 2]; for (int i = 0; i < 100; i++) { entireArray[i] = generator.NextValue(); if ((i & 1) != 0) { toRemove[i / 2] = entireArray[i]; } else { afterRemove[i / 2] = entireArray[i]; } } return(entireArray); }
public bool Equals(RefX1 <T> x) { return(0 == CompareTo(x)); }