Coverage Report - org.jaudiotagger.tag.datatype.StringDate
 
Classes in this File Line Coverage Branch Coverage Complexity
StringDate
0%
0/13
0%
0/6
2
 
 1  
 /**
 2  
  *  @author : Paul Taylor
 3  
  *  @author : Eric Farng
 4  
  *
 5  
  *  Version @version:$Id: StringDate.java,v 1.8 2008/01/01 15:12:55 paultaylor Exp $
 6  
  *
 7  
  *  MusicTag Copyright (C)2003,2004
 8  
  *
 9  
  *  This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser
 10  
  *  General Public  License as published by the Free Software Foundation; either version 2.1 of the License,
 11  
  *  or (at your option) any later version.
 12  
  *
 13  
  *  This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
 14  
  *  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 15  
  *  See the GNU Lesser General Public License for more details.
 16  
  *
 17  
  *  You should have received a copy of the GNU Lesser General Public License along with this library; if not,
 18  
  *  you can get a copy from http://www.opensource.org/licenses/lgpl-license.php or write to the Free Software
 19  
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 20  
  *
 21  
  * Description:
 22  
  *
 23  
  */
 24  
 package org.jaudiotagger.tag.datatype;
 25  
 
 26  
 import org.jaudiotagger.tag.id3.AbstractTagFrameBody;
 27  
 import org.jaudiotagger.tag.id3.ID3Tags;
 28  
 
 29  
 /**
 30  
  * Represents a timestamp field
 31  
  */
 32  
 public class StringDate extends StringFixedLength
 33  
 {
 34  
     /**
 35  
      * Creates a new ObjectStringDate datatype.
 36  
      *
 37  
      * @param identifier
 38  
      */
 39  
     public StringDate(String identifier, AbstractTagFrameBody frameBody)
 40  
     {
 41  0
         super(identifier, frameBody, 8);
 42  0
     }
 43  
 
 44  
     public StringDate(StringDate object)
 45  
     {
 46  0
         super(object);
 47  0
     }
 48  
 
 49  
     /**
 50  
      * @param value
 51  
      */
 52  
     public void setValue(Object value)
 53  
     {
 54  0
         if (value != null)
 55  
         {
 56  0
             this.value = ID3Tags.stripChar(value.toString(), '-');
 57  
         }
 58  0
     }
 59  
 
 60  
     /**
 61  
      * @return
 62  
      */
 63  
     public Object getValue()
 64  
     {
 65  0
         if (value != null)
 66  
         {
 67  0
             return ID3Tags.stripChar(value.toString(), '-');
 68  
         }
 69  
         else
 70  
         {
 71  0
             return null;
 72  
         }
 73  
     }
 74  
 
 75  
     public boolean equals(Object obj)
 76  
     {
 77  0
         if (obj instanceof StringDate == false)
 78  
         {
 79  0
             return false;
 80  
         }
 81  
 
 82  0
         return super.equals(obj);
 83  
     }
 84  
 }