1 19 20 package org.netbeans.core.registry.serialdataconv; 21 22 import java.io.Serializable ; 23 24 28 public class SerializableCD implements Serializable { 29 30 String artist; 31 String album; 32 33 static final long serialVersionUID = -8685006548926070305L; 34 35 public SerializableCD() { 36 artist = "T B D"; 37 album = "U N K N O W N"; 38 } 39 40 public SerializableCD(String ar, String al) { 41 artist = ar; 42 album = al; 43 } 44 45 static public SerializableCD createDefault() { 46 return new SerializableCD("V.A.", "Radio Kiss100 Mixes"); 47 } 48 49 public boolean equals(Object o) { 50 if (!(o instanceof SerializableCD)) { 51 return false; 52 } 53 SerializableCD d = (SerializableCD)o; 54 return artist.equals(d.artist) && 55 album.equals(d.album); 56 } 57 58 public int hashCode() { 59 return 125; 61 } 62 63 public String toString() { 64 return "SerializableCD[artist="+artist+", album="+album+"]"+super.toString(); 65 } 66 67 } 68 | Popular Tags |