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.Object
The CDDB item.
-
-
Constructor Summary
Constructors Constructor Description Cddb()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
computeDifference(MediaItem.Metadata.Cddb other)
Computes the difference to another CDDB.java.lang.String
getToc()
Returns the TOC (Table Of Contents) of this CDDB in string form (e.g.int
getTrackCount()
Returns the number of tracks in the TOCboolean
matches(MediaItem.Metadata.Cddb other, int threshold)
Returnstrue
if this object matches the other CDDB within a given threshold.boolean
sameTrackCountOf(MediaItem.Metadata.Cddb other)
Returnstrue
if 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)
Returnstrue
if this object matches the other CDDB within a given threshold.- Parameters:
other
- the other CDDBthreshold
- the threshold of the comparison- Returns:
true
if this object matches
-
sameTrackCountOf
public boolean sameTrackCountOf(@Nonnull MediaItem.Metadata.Cddb other)
Returnstrue
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
-
-