Code example for NavigableSet

Methods: toArray

0
  @Override public Object[] toArray() {
    return delegate.toArray();
  } 
 
  @Override public <T> T[] toArray(T[] a) {
    return delegate.toArray(a);
  } 
 
  private <T> T checkValid(T t) {
    // a ClassCastException is what's supposed to happen! 
    @SuppressWarnings("unchecked") 
    E e = (E) t;
    comparator().compare(e, e);
    return t;
  } 
 
  @Override public boolean equals(Object obj) {
    return delegate.equals(obj);
  }