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

    r2 r4  
    1 package org.rayflood.mikuvat.io; 
     1package org.rayflood.mikuvat.io.vsq; 
    22 
    3 import static org.rayflood.mikuvat.io.VSQDecoder.adjustMaxMin; 
    4 import static org.rayflood.mikuvat.io.VSQDecoder.splitEqual; 
     3import static org.rayflood.mikuvat.Utilities.adjustMaxMin; 
     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; 
    911 
    10 public class MasterSection extends ImmutableObject{ 
     12import org.rayflood.mikuvat.io.BaseObject; 
     13import org.rayflood.mikuvat.io.InvalidBaseObjectException; 
     14 
     15public class MasterSection extends BaseObject{ 
    1116        private static final long serialVersionUID = 3680414369532973128L; 
    1217 
     
    4449                } 
    4550 
    46                 StringBuffer sb = new StringBuffer(); 
     51                StringBuilder sb = new StringBuilder(); 
    4752                sb.append("MasterSection={"); 
    4853                if(!sl.isEmpty()){ 
     
    5661        } 
    5762 
    58         public boolean isReadied(){ 
     63        public boolean validate() throws InvalidBaseObjectException{ 
    5964                boolean ready = true; 
    6065                ready &= hasPreMeasure(); 
     66                if(!ready){ 
     67                        throw new InvalidBaseObjectException(this); 
     68                } 
    6169                return ready; 
    6270        } 
    6371 
    64         public int compareTo(ImmutableObject obj){ 
     72        public int compareTo(BaseObject obj){ 
    6573                MasterSection masterSection = (MasterSection)obj; 
    6674                return compare(this.getPreMeasure(), masterSection.getPreMeasure()); 
    6775        } 
    6876 
    69         public MasterSection over(Object obj, boolean fill, boolean has){ 
     77        public MasterSection over(BaseObject obj, boolean fill, boolean has){ 
    7078                MasterSection masterSection = ((MasterSection)obj).clone(); 
    7179                if(masterSection.hasPreMeasure() && (fill || has == hasPreMeasure())){ 
     
    129137        } 
    130138 
    131         public static MasterSection load(String file) throws Exception{ 
    132                 return (MasterSection)ImmutableObject.load(file); 
     139        public static MasterSection load(String file) throws FileNotFoundException, IOException, ClassNotFoundException{ 
     140                return (MasterSection)BaseObject.load(file); 
    133141        } 
    134142 
    135         public static MasterSection load(File file) throws Exception{ 
    136                 return (MasterSection)ImmutableObject.load(file); 
     143        public static MasterSection load(File file) throws FileNotFoundException, IOException, ClassNotFoundException{ 
     144                return (MasterSection)BaseObject.load(file); 
    137145        } 
    138146 
    139         public void store(String file) throws Exception{ 
     147        public void store(String file) throws FileNotFoundException, IOException{ 
    140148                super.store(file); 
    141149        } 
    142150 
    143         public void store(File file) throws Exception{ 
     151        public void store(File file) throws FileNotFoundException, IOException{ 
    144152                super.store(file); 
    145153        } 
    146154 
    147         public static MasterSection unzip(String file) throws Exception{ 
    148                 return (MasterSection)ImmutableObject.unzip(file); 
     155        public static MasterSection unzip(String file) throws IOException, ClassNotFoundException{ 
     156                return (MasterSection)BaseObject.unzip(file); 
    149157        } 
    150158 
    151         public static MasterSection unzip(File file) throws Exception{ 
    152                 return (MasterSection)ImmutableObject.unzip(file); 
     159        public static MasterSection unzip(File file) throws IOException, ClassNotFoundException{ 
     160                return (MasterSection)BaseObject.unzip(file); 
    153161        } 
    154162 
    155         public void zip(String file) throws Exception{ 
     163        public void zip(String file) throws IOException{ 
    156164                super.zip(file); 
    157165        } 
    158166 
    159         public void zip(File file) throws Exception{ 
     167        public void zip(File file) throws IOException{ 
    160168                super.zip(file); 
    161169        }