Package com.tagtraum.beatunes.library
Class Subprint
- java.lang.Object
-
- com.tagtraum.beatunes.library.Subprint
-
@Entity public class Subprint extends Object
Subprint.- Author:
- Hendrik Schreiber
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static List<Subprint>
decode(Song song)
Decodes the compressed fingerprint accessible throughAudioSong.getFingerprint()
and creates correspondingSubprint
objects.static List<Subprint>
decode(Song song, byte[] fingerprint)
Decodes the compressed fingerprint accessible throughAudioSong.getFingerprint()
and creates correspondingSubprint
objects.boolean
equals(Object o)
short
getSequenceNumber()
Song
getSong()
int
getValue()
int
hashCode()
int
samebits(Subprint that)
Compares two subprints and returns the number of identical bits.void
setSequenceNumber(short sequenceNumber)
void
setSong(Song song)
static List<Subprint>
subsample(List<Subprint> subprints)
Sub-samples the full list of subprints.String
toString()
-
-
-
Constructor Detail
-
Subprint
public Subprint()
-
Subprint
public Subprint(SubprintId subprintId)
-
Subprint
public Subprint(int value)
-
Subprint
public Subprint(int value, int sequenceNumber)
-
Subprint
public Subprint(int value, short sequenceNumber)
-
-
Method Detail
-
getValue
public int getValue()
-
getSong
public Song getSong()
-
setSong
public void setSong(Song song)
-
getSequenceNumber
public short getSequenceNumber()
-
setSequenceNumber
public void setSequenceNumber(short sequenceNumber)
-
samebits
public int samebits(Subprint that)
Compares two subprints and returns the number of identical bits.- Parameters:
that
- another SubPrint- Returns:
- number of identical bits
-
decode
public static List<Subprint> decode(Song song)
Decodes the compressed fingerprint accessible throughAudioSong.getFingerprint()
and creates correspondingSubprint
objects.- Parameters:
song
- song- Returns:
- subprints
- See Also:
subsample(java.util.List)
-
decode
public static List<Subprint> decode(Song song, byte[] fingerprint)
Decodes the compressed fingerprint accessible throughAudioSong.getFingerprint()
and creates correspondingSubprint
objects.- Parameters:
song
- songfingerprint
- fingerprint- Returns:
- subprints
- See Also:
subsample(java.util.List)
-
subsample
public static List<Subprint> subsample(List<Subprint> subprints)
Sub-samples the full list of subprints. Only important subprints are kept.- Parameters:
subprints
- subprints- Returns:
- important sub-prints
-
-