Package org.bytedeco.javacpp.indexer
Interface Indexable
-
public interface Indexable
An interface implemented to let users access data classes via anIndexer
. The class implementing this interface can choose the type (byte, short, etc.) of the indexer, and whether it is array-based or direct. TheIndexer.release()
method should also be overridden to copy back any data written in the case of non-direct indexers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <I extends Indexer>
IcreateIndexer(boolean direct)
Factory method called by the user to get an indexer to access the data.
-
-
-
Method Detail
-
createIndexer
<I extends Indexer> I createIndexer(boolean direct)
Factory method called by the user to get an indexer to access the data. Eventually,Indexer.release()
should be called to have changes reflected in the underlying data.- Type Parameters:
I
- the type of the returned object- Parameters:
direct
- a hint for the implementation, leaving the choice up to the user, since buffers are slower than arrays on Android, but not with OpenJDK, for example- Returns:
- a concrete
Indexer
- Throws:
java.lang.NullPointerException
- when there is no data
-
-