public List<Entry<E>> asList(){
  if (nonNullList == null) {
    if (array == null || array.length() == 0) {
      nonNullList=Collections.emptyList();
    }
 else {
      List<Entry<E>> list=new ArrayList<>(array.length());
      for (int i=0; i < array.length(); i++) {
        E e=array.get(i);
        if (e != null) {
          list.add(new Entry<>(i,e));
        }
      }
      nonNullList=list;
    }
  }
  return nonNullList;
}

public List < Entry < E > > asList ( ) { if ( nonNullList == null ) { if ( array == null || array . length ( ) == 0 ) { nonNullList = Collections . emptyList ( ) ; } else { List < Entry < E > > list = new ArrayList < > ( array . length ( ) ) ; for ( int i = 0 ; i < array . length ( ) ; i ++ ) { E e = array . get ( i ) ; if ( e != null ) { list . add ( new Entry < > ( i , e ) ) ; } } nonNullList = list ; } } return nonNullList ; }
returns the it as a non null list , with an entry wrapping each value allowing to retain its index .
