if(sortColumn!=indexOfDate && indexOfDate!=-1){ Debug.err("unfilteredCallerData not sorted sorting! (will be slow)");
	public boolean contains(Call newCall) {		Vector unfilteredCallerData = (Vector)this.unfilteredCallerData.clone();		// find index for date collumn		int indexOfDate = -1;		for(int i=0; i<getColumnCount(); i++){			String columnName = getRealColumnName(i);			if(columnName.equals("date")){				indexOfDate = i;			}		}				if(sortColumn!=indexOfDate && indexOfDate!=-1){			Debug.err("unfilteredCallerData not sorted sorting! (will be slow)");//			  This new method is using a binary search algorithm, that means	//		  unfilteredCallerData has to be sorted ascending by date or it won't work			Collections.sort(unfilteredCallerData, new ColumnSorter(indexOfDate, true));		}		// Debug.msg("contains!");		int left, right, middle;		left = 0;		right = unfilteredCallerData.size() - 1;		while (left <= right) {			middle = ((right - left) / 2) + left;			if (unfilteredCallerData.isEmpty())				return false;			Call c = (Call) unfilteredCallerData.elementAt(middle);			int Compare = newCall.getCalldate().compareTo(c.getCalldate());			// check if the date is before or after the current element in the			// vector			// Note: change the values here to fit the current sorting method			if (Compare > 0)				right = middle - 1;			else if (Compare < 0)				left = middle + 1;			else {				// if we are here, then the dates match				// lets check if everything else matches				if (c.equals(newCall))					return true;				else {					// two calls, same date, different values...					// this is really a performance killer...					int tmpMiddle = middle - 1;					// Yikes! Don't forget to stay in the array bounds					if (tmpMiddle >= 0) {						c = (Call) unfilteredCallerData.elementAt(tmpMiddle);						// search left as long as the dates still match						while (c.getCalldate().equals(newCall.getCalldate())) {							// check if equal							if (c.equals(newCall))								return true;							// make sure we stay in the array bounds							if (tmpMiddle > 0)								c = (Call) unfilteredCallerData										.elementAt(--tmpMiddle);							else								break;						}					}					tmpMiddle = middle + 1;					if (tmpMiddle < unfilteredCallerData.size()) {						c = (Call) unfilteredCallerData.elementAt(middle + 1);						// search right as long as the dates still match						while (c.getCalldate().equals(newCall.getCalldate())) {							// check if equal							if (c.equals(newCall))								return true;							// make sure to stay in the array bounds							if (tmpMiddle < (unfilteredCallerData.size() - 1))								c = (Call) unfilteredCallerData										.elementAt(++tmpMiddle);							else								break;						}					}					// No matching calls found with the same date					return false;				}			}		}		// we exited the loop => no matching date found		return false;	}