We have little context to provide advice...for example what does getPosition return? Boolean, String, integer? It helps to post an SSCCE which defines the problem with the minimum number of lines of...