private int GetIndexOf(StateNFA sIn){		
		// Check if there is already a state just like this one.
		for (int i = 0; i < mStates.size(); ++i){
			if (mStates.get(i).mItem.mLeftNonTerminalSymbolIndex == sIn.mItem.mLeftNonTerminalSymbolIndex &&
					mStates.get(i).mIsInitial == sIn.mIsInitial &&
					mStates.get(i).mItem.mItemDotPosition == sIn.mItem.mItemDotPosition &&
					mStates.get(i).mItem.mRightSymbolsIndices.size() == sIn.mItem.mRightSymbolsIndices.size() &&
					mStates.get(i).mItem.mBEGINS_Set.size() == sIn.mItem.mBEGINS_Set.size()){
				Boolean match = true;
				for (int j = 0; j < mStates.get(i).mItem.mRightSymbolsIndices.size(); ++j){ // check right symbols
					if (mStates.get(i).mItem.mRightSymbolsIndices.get(j) != sIn.mItem.mRightSymbolsIndices.get(j)){
						match = false;
						break;
					}
				}
				if (!match) continue;
				for (int j = 0; j < mStates.get(i).mItem.mBEGINS_Set.size(); ++j){ // check b_sets symbols
					if (mStates.get(i).mItem.mBEGINS_Set.get(j) != sIn.mItem.mBEGINS_Set.get(j)){
						match = false;
						break;
					}
				}
				if (match) return i;
			}
		}
		return -1;
	}