// *** IDeeplyCloneable interface implementation *** public BinaryVector DeepClone() { BinaryVector clone = new BinaryVector(); clone.mVec = mVec.DeepClone(); return(clone); }
// *** ICloneable interface implementation *** public BinaryVector <T> Clone() { BinaryVector <T> clone = new BinaryVector <T>(); clone.m_vec = new List <T>(m_vec); return(clone); }
// *** IDeeplyCloneable interface implementation *** public BinaryVector <T> DeepClone() { List <T> vec = new List <T>(m_vec.Count); foreach (T item in m_vec) { vec.Add((T)Utils.Clone(item, /*deep_clone=*/ true)); } BinaryVector <T> clone = new BinaryVector <T>(); clone.m_vec = vec; return(clone); }
// *** IContentEquatable<BinaryVector> interface implementation *** public bool ContentEquals(BinaryVector other) { if (other == null || mVec.Count != other.mVec.Count) { return(false); } for (int i = 0; i < mVec.Count; i++) { if (mVec[i].CompareTo(other.mVec[i]) != 0) { return(false); } } return(true); }
// *** IContentEquatable<BinaryVector<T>.ReadOnly> interface implementation *** public bool ContentEquals(BinaryVector <T> .ReadOnly other) { return(other != null && m_vec.ContentEquals(other.Inner)); }
public ReadOnly(BinarySerializer reader) { m_vec = new BinaryVector <T>(reader); }
public ReadOnly(BinaryVector <T> vec) { Utils.ThrowException(vec == null ? new ArgumentNullException("vec") : null); m_vec = vec; }