Class UnmodifiableIntegerDBIDs

    • Field Detail

      • inner

        private final IntegerDBIDs inner
        The DBIDs we wrap.
    • Constructor Detail

      • UnmodifiableIntegerDBIDs

        public UnmodifiableIntegerDBIDs​(IntegerDBIDs inner)
        Constructor.
        Parameters:
        inner - Inner DBID collection.
    • Method Detail

      • contains

        public boolean contains​(DBIDRef o)
        Description copied from interface: DBIDs
        Test whether an ID is contained.
        Specified by:
        contains in interface DBIDs
        Parameters:
        o - object to test
        Returns:
        true when contained
      • isEmpty

        public boolean isEmpty()
        Description copied from interface: DBIDs
        Test for an empty DBID collection.
        Specified by:
        isEmpty in interface DBIDs
        Returns:
        true when empty.
      • iter

        public IntegerDBIDIter iter()
        Description copied from interface: DBIDs
        Get a DBID iterator (a more efficient API).

        Example:

         
         for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) {
           NumberVector vec = relation.get(iter); // iter is a temporary object reference
         }
         
         
        Specified by:
        iter in interface DBIDs
        Specified by:
        iter in interface IntegerDBIDs
        Returns:
        iterator
      • size

        public int size()
        Description copied from interface: DBIDs
        Retrieve the collection / data size.
        Specified by:
        size in interface DBIDs
        Returns:
        collection size
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object