Package it.tidalwave.bluemarine2.model
Class MediaItem.Metadata.Cddb
- java.lang.Object
-
- it.tidalwave.bluemarine2.model.MediaItem.Metadata.Cddb
-
- Enclosing interface:
- MediaItem.Metadata
@Immutable public static class MediaItem.Metadata.Cddb extends java.lang.ObjectThe CDDB item.
-
-
Constructor Summary
Constructors Constructor Description Cddb()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcomputeDifference(MediaItem.Metadata.Cddb other)Computes the difference to another CDDB.java.lang.StringgetToc()Returns the TOC (Table Of Contents) of this CDDB in string form (e.g.intgetTrackCount()Returns the number of tracks in the TOCbooleanmatches(MediaItem.Metadata.Cddb other, int threshold)Returnstrueif this object matches the other CDDB within a given threshold.booleansameTrackCountOf(MediaItem.Metadata.Cddb other)Returnstrueif this object contains the same number of tracks of the other 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)Returnstrueif this object matches the other CDDB within a given threshold.- Parameters:
other- the other CDDBthreshold- the threshold of the comparison- Returns:
trueif this object matches
-
sameTrackCountOf
public boolean sameTrackCountOf(@Nonnull MediaItem.Metadata.Cddb other)Returnstrueif this object contains the same number of tracks of the other CDDB- Parameters:
other- the other CDDB- Returns:
trueif 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
-
-