001 /*
002 * To change this template, choose Tools | Templates
003 * and open the template in the editor.
004 */
005 package org.bridj;
006
007 import java.util.RandomAccess;
008 import java.util.ArrayList;
009 import java.util.Collection;
010 import java.util.Collections;
011 import java.util.Iterator;
012 import java.util.List;
013 import java.util.ListIterator;
014 import org.bridj.cpp.std.vector;
015 import static org.bridj.Pointer.*;
016
017 /**
018 * Interface for lists that use a native storage.<br>
019 * The only method added to this interface {@link NativeList#getPointer()} returns a pointer to this list, which is does not necessarily point to the first element of the
020 list (it depends on the list's implementation : for instance {@link vector}.getPointer() will return a pointer to the vector structure's pointer, while a list created out of a pointer through {@link Pointer#asList() } will return their storage pointer)
021 * @author ochafik
022 */
023 public interface NativeList<T> extends List<T> {
024 /**
025 * Returns a pointer to this list, which is does not necessarily point to the first element of the
026 list.<br>
027 * The semantics of the returned pointer depends on the list's implementation :
028 * for instance {@link vector}.getPointer() will return a pointer to the vector structure's pointer,
029 * while a list created out of a pointer through {@link Pointer#asList() } will return their storage pointer)
030 */
031 public Pointer<?> getPointer();
032 }