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

    r2 r4  
    1 package org.rayflood.mikuvat.io; 
    2  
    3 import static org.rayflood.mikuvat.io.VSQDecoder.setSectionBracket; 
    4 import static org.rayflood.mikuvat.io.VSQDecoder.splitEqual; 
     1package org.rayflood.mikuvat.io.vsq; 
     2 
     3import static org.rayflood.mikuvat.Utilities.setSectionBracket; 
     4import static org.rayflood.mikuvat.Utilities.splitEqual; 
    55 
    66import java.io.File; 
     7import java.io.FileNotFoundException; 
     8import java.io.IOException; 
    79import java.util.ArrayList; 
    810import java.util.List; 
     
    1012import java.util.TreeMap; 
    1113 
    12 public class TimeLine extends ImmutableObject{ 
     14import org.rayflood.mikuvat.io.BaseObject; 
     15import org.rayflood.mikuvat.io.InvalidBaseObjectException; 
     16 
     17public class TimeLine extends BaseObject{ 
    1318        private static final long serialVersionUID = -3486238291169847310L; 
    1419        public static final String PITCHBEND = "PitchBendBPList"; 
     
    580585                } 
    581586                if(hasEventTimes()){ 
    582                         StringBuffer sb = new StringBuffer(); 
     587                        StringBuilder sb = new StringBuilder(); 
    583588                        Long ticks[] = getTicks(); 
    584589                        sb.append(ticks[0] + "={" + getEventBPTime(ticks[0]).toString() + "}"); 
     
    589594                } 
    590595 
    591                 StringBuffer sb = new StringBuffer(); 
     596                StringBuilder sb = new StringBuilder(); 
    592597                sb.append("TimeLine={"); 
    593598                if(!sl.isEmpty()){ 
     
    601606        } 
    602607 
    603         public boolean isReadied(){ 
     608        public boolean validate() throws InvalidBaseObjectException{ 
    604609                boolean ready = true; 
    605                 ready &= hasInitialSinger() && getInitialSinger().isReadied(); 
     610                ready &= hasInitialSinger() && getInitialSinger().validate(); 
    606611                Long ticks[] = getTicks(); 
    607612                for(int i = 0; i < ticks.length; i++){ 
    608                         ready &= getEventBPTime(ticks[i]).isReadied(); 
     613                        ready &= getEventBPTime(ticks[i]).validate(); 
     614                } 
     615                if(!ready){ 
     616                        throw new InvalidBaseObjectException(this); 
    609617                } 
    610618                return ready; 
    611619        } 
    612620 
    613         public int compareTo(ImmutableObject obj){ 
     621        public int compareTo(BaseObject obj){ 
    614622                TimeLine timeLine = (TimeLine)obj; 
    615623                return compare(getInitialSinger(), timeLine.getInitialSinger()); 
    616624        } 
    617625 
    618         public TimeLine over(Object obj, boolean fill, boolean has){ 
     626        public TimeLine over(BaseObject obj, boolean fill, boolean has){ 
    619627                TimeLine timeLine = ((TimeLine)obj).clone(); 
    620628                if(timeLine.hasInitialSinger()){ 
     
    872880        } 
    873881 
    874         public static TimeLine load(String file) throws Exception{ 
    875                 return (TimeLine)ImmutableObject.load(file); 
    876         } 
    877  
    878         public static TimeLine load(File file) throws Exception{ 
    879                 return (TimeLine)ImmutableObject.load(file); 
    880         } 
    881  
    882         public void store(String file) throws Exception{ 
     882        public static TimeLine load(String file) throws FileNotFoundException, IOException, ClassNotFoundException{ 
     883                return (TimeLine)BaseObject.load(file); 
     884        } 
     885 
     886        public static TimeLine load(File file) throws FileNotFoundException, IOException, ClassNotFoundException{ 
     887                return (TimeLine)BaseObject.load(file); 
     888        } 
     889 
     890        public void store(String file) throws FileNotFoundException, IOException{ 
    883891                super.store(file); 
    884892        } 
    885893 
    886         public void store(File file) throws Exception{ 
     894        public void store(File file) throws FileNotFoundException, IOException{ 
    887895                super.store(file); 
    888896        } 
    889897 
    890         public static TimeLine unzip(String file) throws Exception{ 
    891                 return (TimeLine)ImmutableObject.unzip(file); 
    892         } 
    893  
    894         public static TimeLine unzip(File file) throws Exception{ 
    895                 return (TimeLine)ImmutableObject.unzip(file); 
    896         } 
    897  
    898         public void zip(String file) throws Exception{ 
     898        public static TimeLine unzip(String file) throws IOException, ClassNotFoundException{ 
     899                return (TimeLine)BaseObject.unzip(file); 
     900        } 
     901 
     902        public static TimeLine unzip(File file) throws IOException, ClassNotFoundException{ 
     903                return (TimeLine)BaseObject.unzip(file); 
     904        } 
     905 
     906        public void zip(String file) throws IOException{ 
    899907                super.zip(file); 
    900908        } 
    901909 
    902         public void zip(File file) throws Exception{ 
     910        public void zip(File file) throws IOException{ 
    903911                super.zip(file); 
    904912        }