Example #1
0
  public TagField getFirstField(String id) {
    List<TagField> results = null;

    if (FieldKey.ARTIST.name().equals(id)) {
      results = getArtist();
    } else if (FieldKey.ALBUM.name().equals(id)) {
      results = getAlbum();
    } else if (FieldKey.TITLE.name().equals(id)) {
      results = getTitle();
    } else if (FieldKey.GENRE.name().equals(id)) {
      results = getGenre();
    } else if (FieldKey.YEAR.name().equals(id)) {
      results = getYear();
    } else if (FieldKey.COMMENT.name().equals(id)) {
      results = getComment();
    }

    if (results != null) {
      if (results.size() > 0) {
        return results.get(0);
      }
    }
    return null;
  }
Example #2
0
 public TagField getFirstField(FieldKey genericKey) {
   List<TagField> l = getFields(genericKey);
   return (l.size() != 0) ? l.get(0) : null;
 }
Example #3
0
 protected List<TagField> returnFieldToList(ID3v1TagField field) {
   List<TagField> fields = new ArrayList<TagField>();
   fields.add(field);
   return fields;
 }