boolean (Object target) { if (this == target) { return true; } if (target instanceof Position) { if (pageNumber == ((Position)target).pageNumber && symbolOffsetInPage == ((Position)target).symbolOffsetInPage) { return true; } } return false; }