@Override int indexOf(@Nullable Object target) { int index = forward.indexOf(target); if (index == -1) { return index; } else { return size() - 1 - index; } }
@GwtIncompatible // ImmutableSortedSet.indexOf // TODO(cpovirk): consider manual binary search under GWT to preserve O(log N) lookup @Override public int indexOf(@Nullable Object target) { int index = delegateCollection().indexOf(target); // TODO(kevinb): reconsider if it's really worth making feeble attempts at // sanity for inconsistent comparators. // The equals() check is needed when the comparator isn't compatible with // equals(). return (index >= 0 && get(index).equals(target)) ? index : -1; }
@Override int indexOf(@NullableDecl Object target) { int index = forward.indexOf(target); if (index == -1) { return index; } else { return size() - 1 - index; } }
@Override int indexOf(@NullableDecl Object target) { int index = forward.indexOf(target); if (index == -1) { return index; } else { return size() - 1 - index; } }
@GwtIncompatible // ImmutableSortedSet.indexOf // TODO(cpovirk): consider manual binary search under GWT to preserve O(log N) lookup @Override public int indexOf(@Nullable Object target) { int index = delegateCollection().indexOf(target); // TODO(kevinb): reconsider if it's really worth making feeble attempts at // sanity for inconsistent comparators. // The equals() check is needed when the comparator isn't compatible with // equals(). return (index >= 0 && get(index).equals(target)) ? index : -1; }
@GwtIncompatible // ImmutableSortedSet.indexOf // TODO(cpovirk): consider manual binary search under GWT to preserve O(log N) lookup @Override public int indexOf(@NullableDecl Object target) { int index = delegateCollection().indexOf(target); // TODO(kevinb): reconsider if it's really worth making feeble attempts at // sanity for inconsistent comparators. // The equals() check is needed when the comparator isn't compatible with // equals(). return (index >= 0 && get(index).equals(target)) ? index : -1; }
@Override public boolean contains(Object target) { return backingSet.indexOf(target) >= 0; }
@Override int indexOf(@Nullable Object target) { int index = forward.indexOf(target); if (index == -1) { return index; } else { return size() - 1 - index; } }
@Override int indexOf(@Nullable Object target) { int index = forward.indexOf(target); if (index == -1) { return index; } else { return size() - 1 - index; } }
@Override int indexOf(@Nullable Object target) { int index = forward.indexOf(target); if (index == -1) { return index; } else { return size() - 1 - index; } }
@Override int indexOf(@Nullable Object target) { int index = forward.indexOf(target); if (index == -1) { return index; } else { return size() - 1 - index; } }
@Override int indexOf(@Nullable Object target) { int index = forward.indexOf(target); if (index == -1) { return index; } else { return size() - 1 - index; } }
@GwtIncompatible("ImmutableSortedSet.indexOf") // TODO(cpovirk): consider manual binary search under GWT to preserve O(log N) lookup @Override public int indexOf(@Nullable Object target) { int index = delegateCollection().indexOf(target); // TODO(kevinb): reconsider if it's really worth making feeble attempts at // sanity for inconsistent comparators. // The equals() check is needed when the comparator isn't compatible with // equals(). return (index >= 0 && get(index).equals(target)) ? index : -1; }
@Override int indexOf(@NullableDecl Object target) { int index = forward.indexOf(target); if (index == -1) { return index; } else { return size() - 1 - index; } }
@GwtIncompatible("ImmutableSortedSet.indexOf") // TODO(cpovirk): consider manual binary search under GWT to preserve O(log N) lookup @Override public int indexOf(@Nullable Object target) { int index = delegateCollection().indexOf(target); // TODO(kevinb): reconsider if it's really worth making feeble attempts at // sanity for inconsistent comparators. // The equals() check is needed when the comparator isn't compatible with // equals(). return (index >= 0 && get(index).equals(target)) ? index : -1; }
@GwtIncompatible("ImmutableSortedSet.indexOf") // TODO(cpovirk): consider manual binary search under GWT to preserve O(log N) lookup @Override public int indexOf(@Nullable Object target) { int index = delegateCollection().indexOf(target); // TODO(kevinb): reconsider if it's really worth making feeble attempts at // sanity for inconsistent comparators. // The equals() check is needed when the comparator isn't compatible with // equals(). return (index >= 0 && get(index).equals(target)) ? index : -1; }
@GwtIncompatible("ImmutableSortedSet.indexOf") // TODO(cpovirk): consider manual binary search under GWT to preserve O(log N) lookup @Override public int indexOf(@Nullable Object target) { int index = delegateCollection().indexOf(target); // TODO(kevinb): reconsider if it's really worth making feeble attempts at // sanity for inconsistent comparators. // The equals() check is needed when the comparator isn't compatible with // equals(). return (index >= 0 && get(index).equals(target)) ? index : -1; }
@GwtIncompatible("ImmutableSortedSet.indexOf") // TODO(cpovirk): consider manual binary search under GWT to preserve O(log N) lookup @Override public int indexOf(@Nullable Object target) { int index = delegateCollection().indexOf(target); // TODO(kevinb): reconsider if it's really worth making feeble attempts at // sanity for inconsistent comparators. // The equals() check is needed when the comparator isn't compatible with // equals(). return (index >= 0 && get(index).equals(target)) ? index : -1; }
@GwtIncompatible("ImmutableSortedSet.indexOf") // TODO(cpovirk): consider manual binary search under GWT to preserve O(log N) lookup @Override public int indexOf(@Nullable Object target) { int index = delegateCollection().indexOf(target); // TODO(kevinb): reconsider if it's really worth making feeble attempts at // sanity for inconsistent comparators. // The equals() check is needed when the comparator isn't compatible with // equals(). return (index >= 0 && get(index).equals(target)) ? index : -1; }
@GwtIncompatible // ImmutableSortedSet.indexOf // TODO(cpovirk): consider manual binary search under GWT to preserve O(log N) lookup @Override public int indexOf(@Nullable Object target) { int index = delegateCollection().indexOf(target); // TODO(kevinb): reconsider if it's really worth making feeble attempts at // sanity for inconsistent comparators. // The equals() check is needed when the comparator isn't compatible with // equals(). return (index >= 0 && get(index).equals(target)) ? index : -1; }