Class DataStoreUtil


  • public final class DataStoreUtil
    extends java.lang.Object
    Storage utility class. Mostly a shorthand for DataStoreFactory.FACTORY.
    Since:
    0.4.0
    Author:
    Erich Schubert
    • Constructor Detail

      • DataStoreUtil

        private DataStoreUtil()
        Private constructor. Static methods only.
    • Method Detail

      • makeStorage

        public static <T> WritableDataStore<T> makeStorage​(DBIDs ids,
                                                           int hints,
                                                           java.lang.Class<? super T> dataclass)
        Make a new storage, to associate the given ids with an object of class dataclass.
        Type Parameters:
        T - stored data type
        Parameters:
        ids - DBIDs to store data for
        hints - Hints for the storage manager
        dataclass - class to store
        Returns:
        new data store
      • makeDBIDStorage

        public static WritableDBIDDataStore makeDBIDStorage​(DBIDs ids,
                                                            int hints)
        Make a new storage, to associate the given ids with an object of class dataclass.
        Parameters:
        ids - DBIDs to store data for
        hints - Hints for the storage manager
        Returns:
        new data store
      • makeDoubleStorage

        public static WritableDoubleDataStore makeDoubleStorage​(DBIDs ids,
                                                                int hints)
        Make a new storage, to associate the given ids with an object of class dataclass.
        Parameters:
        ids - DBIDs to store data for
        hints - Hints for the storage manager
        Returns:
        new data store
      • makeDoubleStorage

        public static WritableDoubleDataStore makeDoubleStorage​(DBIDs ids,
                                                                int hints,
                                                                double def)
        Make a new storage, to associate the given ids with an object of class dataclass.
        Parameters:
        ids - DBIDs to store data for
        hints - Hints for the storage manager
        def - Default value
        Returns:
        new data store
      • makeIntegerStorage

        public static WritableIntegerDataStore makeIntegerStorage​(DBIDs ids,
                                                                  int hints)
        Make a new storage, to associate the given ids with an object of class dataclass.
        Parameters:
        ids - DBIDs to store data for
        hints - Hints for the storage manager
        Returns:
        new data store
      • makeIntegerStorage

        public static WritableIntegerDataStore makeIntegerStorage​(DBIDs ids,
                                                                  int hints,
                                                                  int def)
        Make a new storage, to associate the given ids with an object of class dataclass.
        Parameters:
        ids - DBIDs to store data for
        hints - Hints for the storage manager
        def - Default value
        Returns:
        new data store
      • makeRecordStorage

        public static WritableRecordStore makeRecordStorage​(DBIDs ids,
                                                            int hints,
                                                            java.lang.Class<?>... dataclasses)
        Make a new record storage, to associate the given ids with an object of class dataclass.
        Parameters:
        ids - DBIDs to store data for
        hints - Hints for the storage manager
        dataclasses - classes to store
        Returns:
        new record store