差分発生行の前後
無視リスト:
更新日時:
2010/05/11 20:15:55 (2 年 前)
更新者:
h
ログメッセージ:

refs #2 #8 #9 #7 #6
現状のソースをコミット。一部完了。一部未完了。
関連づいてない完了チケットのチェンジセットもまとめて。
パッケージ階層も大幅に変更。

パス:
trunk/src/org/rayflood/mikuvat/io/vsq
ファイル:
1 追加
1 移動

凡例:

変更なし
追加
削除
  • trunk/src/org/rayflood/mikuvat/io/vsq/LyricHandle.java

    r2 r4  
    1 package org.rayflood.mikuvat.io; 
     1package org.rayflood.mikuvat.io.vsq; 
    22 
    3 import static org.rayflood.mikuvat.io.VSQDecoder.splitEqual; 
     3import static org.rayflood.mikuvat.Utilities.splitEqual; 
    44 
    55import java.io.File; 
     6import java.io.FileNotFoundException; 
     7import java.io.IOException; 
    68import java.util.ArrayList; 
    79import java.util.List; 
    810 
    9 public class LyricHandle extends ImmutableObject{ 
     11import org.rayflood.mikuvat.io.BaseObject; 
     12import org.rayflood.mikuvat.io.InvalidBaseObjectException; 
     13 
     14public class LyricHandle extends BaseObject{ 
    1015        private static final long serialVersionUID = 3044157326865723314L; 
    1116        private ArrayList<LyricNote> lyricNotes; 
     
    4752                } 
    4853 
    49                 StringBuffer sb = new StringBuffer(); 
     54                StringBuilder sb = new StringBuilder(); 
    5055                sb.append("LyricHandle={"); 
    5156                if(!sl.isEmpty()){ 
     
    5964        } 
    6065 
    61         public boolean isReadied(){ 
     66        public boolean validate() throws InvalidBaseObjectException{ 
    6267                boolean ready = true; 
    63                 ready &= hasLyricNotes() && getLyricNote().isReadied(); 
     68                ready &= hasLyricNotes() && getLyricNote().validate(); 
     69                if(!ready){ 
     70                        throw new InvalidBaseObjectException(this); 
     71                } 
    6472                return ready; 
    6573        } 
    6674 
    67         public int compareTo(ImmutableObject obj){ 
     75        public int compareTo(BaseObject obj){ 
    6876                LyricHandle lyricHandle = (LyricHandle)obj; 
    6977                return compare(getLyricNote(), lyricHandle.getLyricNote()); 
    7078        } 
    7179 
    72         public LyricHandle over(Object obj, boolean fill, boolean has){ 
     80        public LyricHandle over(BaseObject obj, boolean fill, boolean has){ 
    7381                LyricHandle lyricHandle = ((LyricHandle)obj).clone(); 
    7482                if(lyricHandle.hasLyricNotes()){ 
     
    150158        } 
    151159 
    152         public static LyricHandle load(String file) throws Exception{ 
    153                 return (LyricHandle)ImmutableObject.load(file); 
     160        public static LyricHandle load(String file) throws FileNotFoundException, IOException, ClassNotFoundException{ 
     161                return (LyricHandle)BaseObject.load(file); 
    154162        } 
    155163 
    156         public static LyricHandle load(File file) throws Exception{ 
    157                 return (LyricHandle)ImmutableObject.load(file); 
     164        public static LyricHandle load(File file) throws FileNotFoundException, IOException, ClassNotFoundException{ 
     165                return (LyricHandle)BaseObject.load(file); 
    158166        } 
    159167 
    160         public void store(String file) throws Exception{ 
     168        public void store(String file) throws FileNotFoundException, IOException{ 
    161169                super.store(file); 
    162170        } 
    163171 
    164         public void store(File file) throws Exception{ 
     172        public void store(File file) throws FileNotFoundException, IOException{ 
    165173                super.store(file); 
    166174        } 
    167175 
    168         public static LyricHandle unzip(String file) throws Exception{ 
    169                 return (LyricHandle)ImmutableObject.unzip(file); 
     176        public static LyricHandle unzip(String file) throws IOException, ClassNotFoundException{ 
     177                return (LyricHandle)BaseObject.unzip(file); 
    170178        } 
    171179 
    172         public static LyricHandle unzip(File file) throws Exception{ 
    173                 return (LyricHandle)ImmutableObject.unzip(file); 
     180        public static LyricHandle unzip(File file) throws IOException, ClassNotFoundException{ 
     181                return (LyricHandle)BaseObject.unzip(file); 
    174182        } 
    175183 
    176         public void zip(String file) throws Exception{ 
     184        public void zip(String file) throws IOException{ 
    177185                super.zip(file); 
    178186        } 
    179187 
    180         public void zip(File file) throws Exception{ 
     188        public void zip(File file) throws IOException{ 
    181189                super.zip(file); 
    182190        }