Class IdArray

    • Field Detail

      • data

        protected com.googlecode.javaewah.EWAHCompressedBitmap data
    • Constructor Detail

      • IdArray

        public IdArray()
    • Method Detail

      • addEntity

        public void addEntity​(Long ds)
        Add the data set to the list of those which are in the array. If it is already included, nothing will change.
        Parameters:
        ds - this is cast to an int
        Throws:
        IllegalArgumentException - if the value is too larger to be stored as an integer.
      • and

        public Collection<Long> and​(IdArray other)
        Parameters:
        other - the other idArray to compare with.
        Returns:
        datasets IDs it has in common with this.
      • andSet

        public Set<Long> andSet​(IdArray other)
        Parameters:
        other - the other idArray to compare with.
        Returns:
        datasets IDs it has in common with this, as a set
      • getBytes

        public byte[] getBytes()
      • setBytes

        public void setBytes​(byte[] bytes)
      • getIdsSet

        public Set<Long> getIdsSet()
        Returns:
        set representation
      • getNumIds

        public int getNumIds()
        Returns:
        how many datasets there are
      • isIncluded

        public boolean isIncluded​(Long g)
        Use 'and' instead if possible.
        Parameters:
        g - the id to check for
        Returns:
        true if the given id is in this array
      • removeEntity

        public void removeEntity​(Long ds)
        Parameters:
        ds - ID of dataset to remove. If it isn't here, has no effect.