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

    r2 r4  
    1 package org.rayflood.mikuvat.io; 
    2  
    3 import static org.rayflood.mikuvat.io.VSQDecoder.SPLITCOMMA; 
    4 import static org.rayflood.mikuvat.io.VSQDecoder.splitEqual; 
     1package org.rayflood.mikuvat.io.vsq; 
     2 
     3import static org.rayflood.mikuvat.Utilities.SPLITCOMMA; 
     4import static org.rayflood.mikuvat.Utilities.splitEqual; 
    55 
    66import java.awt.Color; 
    77import java.io.File; 
     8import java.io.FileNotFoundException; 
     9import java.io.IOException; 
    810import java.util.ArrayList; 
    911import java.util.List; 
    1012 
    11 public class CommonSection extends ImmutableObject{ 
     13import org.rayflood.mikuvat.io.BaseObject; 
     14import org.rayflood.mikuvat.io.InvalidBaseObjectException; 
     15 
     16public class CommonSection extends BaseObject{ 
    1217        private static final long serialVersionUID = 8435457526013952633L; 
    1318        public static final String VERSION = "Version"; 
     
    7782                } 
    7883 
    79                 StringBuffer sb = new StringBuffer(); 
     84                StringBuilder sb = new StringBuilder(); 
    8085                sb.append("CommonSection={"); 
    8186                if(!sl.isEmpty()){ 
     
    8994        } 
    9095 
    91         public boolean isReadied(){ 
     96        public boolean validate() throws InvalidBaseObjectException{ 
    9297                boolean ready = true; 
    9398                ready &= hasVersion(); 
     
    96101                ready &= hasDynamicsMode(); 
    97102                ready &= hasPlayMode(); 
     103                if(!ready){ 
     104                        throw new InvalidBaseObjectException(this); 
     105                } 
    98106                return ready; 
    99107        } 
    100108 
    101         public int compareTo(ImmutableObject obj){ 
     109        public int compareTo(BaseObject obj){ 
    102110                CommonSection commonSection = (CommonSection)obj; 
    103111                int c = compare(getName(), commonSection.getName()); 
     
    108116        } 
    109117 
    110         public CommonSection over(Object obj, boolean fill, boolean has){ 
     118        public CommonSection over(BaseObject obj, boolean fill, boolean has){ 
    111119                CommonSection commonSection = ((CommonSection)obj).clone(); 
    112120                if(commonSection.hasVersion() && (fill || has == hasVersion())){ 
     
    276284        } 
    277285 
    278         public static CommonSection load(String file) throws Exception{ 
    279                 return (CommonSection)ImmutableObject.load(file); 
    280         } 
    281  
    282         public static CommonSection load(File file) throws Exception{ 
    283                 return (CommonSection)ImmutableObject.load(file); 
    284         } 
    285  
    286         public void store(String file) throws Exception{ 
     286        public static CommonSection load(String file) throws FileNotFoundException, IOException, ClassNotFoundException{ 
     287                return (CommonSection)BaseObject.load(file); 
     288        } 
     289 
     290        public static CommonSection load(File file) throws FileNotFoundException, IOException, ClassNotFoundException{ 
     291                return (CommonSection)BaseObject.load(file); 
     292        } 
     293 
     294        public void store(String file) throws FileNotFoundException, IOException{ 
    287295                super.store(file); 
    288296        } 
    289297 
    290         public void store(File file) throws Exception{ 
     298        public void store(File file) throws FileNotFoundException, IOException{ 
    291299                super.store(file); 
    292300        } 
    293301 
    294         public static CommonSection unzip(String file) throws Exception{ 
    295                 return (CommonSection)ImmutableObject.unzip(file); 
    296         } 
    297  
    298         public static CommonSection unzip(File file) throws Exception{ 
    299                 return (CommonSection)ImmutableObject.unzip(file); 
    300         } 
    301  
    302         public void zip(String file) throws Exception{ 
     302        public static CommonSection unzip(String file) throws IOException, ClassNotFoundException{ 
     303                return (CommonSection)BaseObject.unzip(file); 
     304        } 
     305 
     306        public static CommonSection unzip(File file) throws IOException, ClassNotFoundException{ 
     307                return (CommonSection)BaseObject.unzip(file); 
     308        } 
     309 
     310        public void zip(String file) throws IOException{ 
    303311                super.zip(file); 
    304312        } 
    305313 
    306         public void zip(File file) throws Exception{ 
     314        public void zip(File file) throws IOException{ 
    307315                super.zip(file); 
    308316        }