public int indexOfItemId(int itemId) {
		int beginIndex = 0, halfIndex, endIndex = itemIds.length;
		if(itemIds.length > 0) {
			while(true){
				halfIndex = (endIndex - beginIndex) / 2 + beginIndex;
				if(itemId < itemIds[halfIndex]){
					if(endIndex - beginIndex <= 1){
						return -1;
					}
					endIndex = halfIndex;
				}else if(itemId > itemIds[halfIndex]){
					if(endIndex - beginIndex <= 1){
						return -1;
					}
					beginIndex = halfIndex;
				}else{
					return halfIndex;
				}
			}
		}else{
			return -1;
		}
	}