Package org.bytedeco.javacpp.indexer
Interface Indexable
public interface Indexable
An interface implemented to let users access data classes via an
Indexer
.
The class implementing this interface can choose the type (byte, short, etc.) of
the indexer, and whether it is array-based or direct. The Indexer.release()
method should also be overridden to copy back any data written in the case of
non-direct indexers.-
Method Summary
Modifier and TypeMethodDescription<I extends Indexer>
IcreateIndexer
(boolean direct) Factory method called by the user to get an indexer to access the data.
-
Method Details
-
createIndexer
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:
NullPointerException
- when there is no data
-