/// <summary>모든 AZData 중 Name값이 설정되고, Name값이 지정된 Name값과 일치하는 자료의 목록을 반환</summary> /// <param name="name">string, </param> public AZList Get(string name) { AZList rtnValue = new AZList(); for (int cnti = 0; cnti < this.list.Count; cnti++) { if (Get(cnti).Name != null && Get(cnti).Name.Equals(name)) { rtnValue.Add(Get(cnti)); } } return(rtnValue); }
/// <summary></summary> public AZList GetList(int start_index, int length) { if (start_index < 0 || length < 1 || start_index >= Size()) { throw new Exception("start_index or length value is invalid"); } int end_index = start_index + length; if (end_index >= Size()) { end_index = Size(); } // AZList rtnValue = new AZList(); for (int cnti = start_index; cnti < end_index; cnti++) { rtnValue.Add(Get(cnti)); } return(rtnValue); }
public AZList Splice(int idx, int length) { AZList rtnVal = new AZList(); // if (Size() < 1 || length < 1 || idx < 0) { return(rtnVal); } int sIdx = idx; int eIdx = idx + length <= Size() ? idx + length : Size(); for (int i = sIdx; i < eIdx; i++) { if (sIdx < 0 || sIdx >= Size()) { continue; } rtnVal.Add(Get(sIdx)); Remove(sIdx); } // return(rtnVal); }