Class MediaItem.Metadata.Cddb

  • Enclosing interface:
    MediaItem.Metadata

    @Immutable
    public static class MediaItem.Metadata.Cddb
    extends java.lang.Object
    The CDDB item.
    • Constructor Summary

      Constructors 
      Constructor Description
      Cddb()  
    • Constructor Detail

      • Cddb

        public Cddb()
    • Method Detail

      • getToc

        @Nonnull
        public java.lang.String getToc()
        Returns the TOC (Table Of Contents) of this CDDB in string form (e.g. 1+3+4506+150+3400+4000)
        Returns:
        the TOC
      • getTrackCount

        @Nonnegative
        public int getTrackCount()
        Returns the number of tracks in the TOC
        Returns:
        the number of tracks
      • matches

        public boolean matches​(@Nonnull
                               MediaItem.Metadata.Cddb other,
                               @Nonnegative
                               int threshold)
        Returns true if this object matches the other CDDB within a given threshold.
        Parameters:
        other - the other CDDB
        threshold - the threshold of the comparison
        Returns:
        true if this object matches
      • sameTrackCountOf

        public boolean sameTrackCountOf​(@Nonnull
                                        MediaItem.Metadata.Cddb other)
        Returns true if this object contains the same number of tracks of the other CDDB
        Parameters:
        other - the other CDDB
        Returns:
        true if the number of tracks matches
      • computeDifference

        public int computeDifference​(@Nonnull
                                     MediaItem.Metadata.Cddb other)
        Computes the difference to another CDDB.
        Parameters:
        other - the other CDDB
        Returns:
        the difference