[java] How to find index position of an element in a list when contains returns true