差分発生行の前後
無視リスト:
更新日時:
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/AnoteEvent.java

    r2 r4  
    1 package org.rayflood.mikuvat.io; 
    2  
    3 import static org.rayflood.mikuvat.io.VSQDecoder.adjustMaxMin; 
    4 import static org.rayflood.mikuvat.io.VSQDecoder.setSectionBracket; 
     1package org.rayflood.mikuvat.io.vsq; 
     2 
     3import static org.rayflood.mikuvat.Utilities.adjustMaxMin; 
     4import static org.rayflood.mikuvat.Utilities.setSectionBracket; 
    55 
    66import java.io.File; 
     7import java.io.FileNotFoundException; 
     8import java.io.IOException; 
    79import java.util.ArrayList; 
    810import java.util.List; 
    911import java.util.Map; 
     12 
     13import org.rayflood.mikuvat.io.BaseObject; 
     14import org.rayflood.mikuvat.io.InvalidBaseObjectException; 
    1015 
    1116public class AnoteEvent extends Event{ 
     
    292297                } 
    293298 
    294                 StringBuffer sb = new StringBuffer(); 
     299                StringBuilder sb = new StringBuilder(); 
    295300                sb.append("AnoteEvent={"); 
    296301                if(!sl.isEmpty()){ 
     
    304309        } 
    305310 
    306         public boolean isReadied(){ 
     311        public boolean validate() throws InvalidBaseObjectException{ 
    307312                boolean ready = true; 
    308313                ready &= hasLength(); 
     
    314319                ready &= hasDecay(); 
    315320                ready &= hasAccent(); 
    316                 ready &= hasLyricHandle() && getLyricHandle().isReadied(); 
    317                 ready &= !hasVibratoHandle() || getVibratoHandle().isReadied(); 
     321                ready &= hasLyricHandle() && getLyricHandle().validate(); 
     322                ready &= !hasVibratoHandle() || getVibratoHandle().validate(); 
     323                if(!ready){ 
     324                        throw new InvalidBaseObjectException(this); 
     325                } 
    318326                return ready; 
    319327        } 
    320328 
    321         public int compareTo(ImmutableObject obj){ 
     329        public int compareTo(BaseObject obj){ 
    322330                AnoteEvent anoteEvent = (AnoteEvent)obj; 
    323331                int c = compare(getLyricHandle(), anoteEvent.getLyricHandle()); 
     
    331339        } 
    332340 
    333         public AnoteEvent over(Object obj, boolean fill, boolean has){ 
     341        public AnoteEvent over(BaseObject obj, boolean fill, boolean has){ 
    334342                AnoteEvent anoteEvent = ((AnoteEvent)obj).clone(); 
    335343                if(anoteEvent.hasLength() && (fill || has == hasLength())){ 
     
    657665        } 
    658666 
    659         public static AnoteEvent load(String file) throws Exception{ 
    660                 return (AnoteEvent)ImmutableObject.load(file); 
    661         } 
    662  
    663         public static AnoteEvent load(File file) throws Exception{ 
    664                 return (AnoteEvent)ImmutableObject.load(file); 
    665         } 
    666  
    667         public void store(String file) throws Exception{ 
     667        public static AnoteEvent load(String file) throws FileNotFoundException, IOException, ClassNotFoundException{ 
     668                return (AnoteEvent)BaseObject.load(file); 
     669        } 
     670 
     671        public static AnoteEvent load(File file) throws FileNotFoundException, IOException, ClassNotFoundException{ 
     672                return (AnoteEvent)BaseObject.load(file); 
     673        } 
     674 
     675        public void store(String file) throws FileNotFoundException, IOException{ 
    668676                super.store(file); 
    669677        } 
    670678 
    671         public void store(File file) throws Exception{ 
     679        public void store(File file) throws FileNotFoundException, IOException{ 
    672680                super.store(file); 
    673681        } 
    674682 
    675         public static AnoteEvent unzip(String file) throws Exception{ 
    676                 return (AnoteEvent)ImmutableObject.unzip(file); 
    677         } 
    678  
    679         public static AnoteEvent unzip(File file) throws Exception{ 
    680                 return (AnoteEvent)ImmutableObject.unzip(file); 
    681         } 
    682  
    683         public void zip(String file) throws Exception{ 
     683        public static AnoteEvent unzip(String file) throws IOException, ClassNotFoundException{ 
     684                return (AnoteEvent)BaseObject.unzip(file); 
     685        } 
     686 
     687        public static AnoteEvent unzip(File file) throws IOException, ClassNotFoundException{ 
     688                return (AnoteEvent)BaseObject.unzip(file); 
     689        } 
     690 
     691        public void zip(String file) throws IOException{ 
    684692                super.zip(file); 
    685693        } 
    686694 
    687         public void zip(File file) throws Exception{ 
     695        public void zip(File file) throws IOException{ 
    688696                super.zip(file); 
    689697        }