/// /// <summary> * fitsCompleteList - tests whether <code>value</code> matches the given /// * testlist (ListType=CompleteList) /// * </summary> /// * <param name="value"> /// * value to test </param> /// * <param name="list"> /// * testlist, either AllowedValueList or PresentValueList. /// * </param> /// * <returns> boolean - true, if <code>value</code> matches the testlist </returns> /// private bool fitsCompleteList(JDFIntegerRangeList @value, JDFIntegerRangeList list) { int v_size = @value.Count; int l_size = list.Count; if (v_size != l_size) { return(false); } if ([email protected]()) { return(false); } JDFIntegerRangeList valueList = new JDFIntegerRangeList(@value); bool bFound; for (int i = l_size - 1; i >= 0; i--) { bFound = false; for (int j = valueList.Count - 1; j >= 0; j--) { if (list[i].Equals(valueList[j])) { valueList.erase(j); bFound = true; break; } } if (!bFound) { return(false); } } return(true); }
/// /// <summary> * fitsCompleteOrderedList - tests whether <code>value</code> matches the /// * given testlist (ListType=CompleteOrderedList) /// * </summary> /// * <param name="value"> /// * value to test </param> /// * <param name="list"> /// * testlist, either AllowedValueList or PresentValueList. /// * </param> /// * <returns> boolean - true, if <code>value</code> matches the testlist </returns> /// private bool fitsCompleteOrderedList(JDFIntegerRangeList @value, JDFIntegerRangeList list) { int v_size = @value.Count; int l_size = list.Count; if (v_size != l_size) { return(false); } if ([email protected]()) { return(false); } for (int i = 0; i < l_size; i++) { if (!list[i].Equals(@value[i])) { return(false); } } return(true); }