1 | package org.farng.mp3.object; |
2 | |
3 | /** |
4 | * ID3v2 and Lyrics3v2 tags have individual fields <code>AbstractMP3Fragment</code>s Then each fragment is broken down |
5 | * in to individual <code>AbstractMP3Object</code>s |
6 | * |
7 | * @author Eric Farng |
8 | * @version $Revision: 1.4 $ |
9 | */ |
10 | public class ObjectStringDateTime extends ObjectStringSizeTerminated { |
11 | |
12 | /** |
13 | * Creates a new ObjectStringDateTime object. |
14 | */ |
15 | public ObjectStringDateTime(final String identifier) { |
16 | super(identifier); |
17 | } |
18 | |
19 | /** |
20 | * Creates a new ObjectStringDateTime object. |
21 | */ |
22 | public ObjectStringDateTime(final ObjectStringDateTime object) { |
23 | super(object); |
24 | } |
25 | |
26 | public void setValue(final Object value) { |
27 | if (value != null) { |
28 | this.value = value.toString().replace(' ', 'T'); |
29 | } |
30 | } |
31 | |
32 | public Object getValue() { |
33 | if (this.value != null) { |
34 | return this.value.toString().replace(' ', 'T'); |
35 | } |
36 | return null; |
37 | } |
38 | |
39 | public boolean equals(final Object obj) { |
40 | if (obj instanceof ObjectStringDateTime == false) { |
41 | return false; |
42 | } |
43 | return super.equals(obj); |
44 | } |
45 | } |