Interface ModifiableDBIDs

    • Method Detail

      • addDBIDs

        boolean addDBIDs​(DBIDs ids)
        Add DBIDs to collection.
        Parameters:
        ids - IDs to add.
        Returns:
        true if the collection changed.
      • removeDBIDs

        boolean removeDBIDs​(DBIDs ids)
        Remove DBIDs from collection.
        Parameters:
        ids - IDs to remove.
        Returns:
        true if the collection changed.
      • add

        boolean add​(DBIDRef id)
        Add a single DBID to the collection.
        Parameters:
        id - ID to add
        Returns:
        true if the collection changed.
      • remove

        boolean remove​(DBIDRef id)
        Remove a single DBID from the collection.
        Parameters:
        id - ID to remove
        Returns:
        true if the collection changed.
      • iter

        DBIDMIter iter()
        Get a modifiable DBID iterator (a more efficient API).

        usage example:

         
         for(DBIDMIter iter = ids.iter(); iter.valid(); iter.advance()) {
           DBID id = iter.getDBID();
           iter.remove();
         }
         
         
        Specified by:
        iter in interface DBIDs
        Returns:
        modifiable iterator
      • pop

        DBIDVar pop​(DBIDVar outvar)
        Pop (get and remove) one DBID from the set, into a variable.
        Parameters:
        outvar - Output variable
        Returns:
        Always outvar, for inlining
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - when empty.