差分発生行の前後
無視リスト:
更新日時:
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/LyricNote.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.SPLITDQUOTE; 
    5 import static org.rayflood.mikuvat.io.VSQDecoder.adjustMaxMin; 
    6 import static org.rayflood.mikuvat.io.VSQDecoder.getBigDecimalString; 
    7 import static org.rayflood.mikuvat.io.VSQDecoder.getBooleanValue; 
    8 import static org.rayflood.mikuvat.io.VSQDecoder.getStringValue; 
     1package org.rayflood.mikuvat.io.vsq; 
     2 
     3import static org.rayflood.mikuvat.Utilities.SPLITCOMMA; 
     4import static org.rayflood.mikuvat.Utilities.SPLITDQUOTE; 
     5import static org.rayflood.mikuvat.Utilities.adjustMaxMin; 
     6import static org.rayflood.mikuvat.Utilities.getBigDecimalString; 
     7import static org.rayflood.mikuvat.Utilities.getBooleanValue; 
     8import static org.rayflood.mikuvat.Utilities.getStringValue; 
    99 
    1010import java.io.File; 
     11import java.io.FileNotFoundException; 
     12import java.io.IOException; 
    1113import java.math.BigDecimal; 
    1214import java.util.ArrayList; 
    1315import java.util.List; 
    1416 
    15 public class LyricNote extends ImmutableObject{ 
     17import org.rayflood.mikuvat.io.BaseObject; 
     18import org.rayflood.mikuvat.io.InvalidBaseObjectException; 
     19 
     20public class LyricNote extends BaseObject{ 
    1621        private static final long serialVersionUID = -119405351990339359L; 
    1722        public static final BigDecimal A_MAX = new BigDecimal("1.0"); 
     
    7883                } 
    7984                if(hasB()){ 
    80                         StringBuffer sb = new StringBuffer(); 
     85                        StringBuilder sb = new StringBuilder(); 
    8186                        sb.append(b[0]); 
    8287                        for(int i = 1; i < b.length; i++){ 
     
    8994                } 
    9095 
    91                 StringBuffer sb = new StringBuffer(); 
     96                StringBuilder sb = new StringBuilder(); 
    9297                sb.append("LyricNote={"); 
    9398                if(!sl.isEmpty()){ 
     
    101106        } 
    102107 
    103         public boolean isReadied(){ 
     108        public boolean validate() throws InvalidBaseObjectException{ 
    104109                boolean ready = true; 
    105110                ready &= hasCaption(); 
     
    108113                ready &= hasB(); 
    109114                ready &= hasProtect(); 
     115                if(!ready){ 
     116                        throw new InvalidBaseObjectException(this); 
     117                } 
    110118                return ready; 
    111119        } 
    112120 
    113         public int compareTo(ImmutableObject obj){ 
     121        public int compareTo(BaseObject obj){ 
    114122                LyricNote lyricNote = (LyricNote)obj; 
    115123                int c = compare(getCaption(), lyricNote.getCaption()); 
     
    123131        } 
    124132 
    125         public LyricNote over(Object obj, boolean fill, boolean has){ 
     133        public LyricNote over(BaseObject obj, boolean fill, boolean has){ 
    126134                LyricNote lyricNote = ((LyricNote)obj).clone(); 
    127135                if(lyricNote.hasCaption() && (fill || has == hasCaption())){ 
     
    281289        } 
    282290 
    283         public static LyricNote load(String file) throws Exception{ 
    284                 return (LyricNote)ImmutableObject.load(file); 
    285         } 
    286  
    287         public static LyricNote load(File file) throws Exception{ 
    288                 return (LyricNote)ImmutableObject.load(file); 
    289         } 
    290  
    291         public void store(String file) throws Exception{ 
     291        public static LyricNote load(String file) throws FileNotFoundException, IOException, ClassNotFoundException{ 
     292                return (LyricNote)BaseObject.load(file); 
     293        } 
     294 
     295        public static LyricNote load(File file) throws FileNotFoundException, IOException, ClassNotFoundException{ 
     296                return (LyricNote)BaseObject.load(file); 
     297        } 
     298 
     299        public void store(String file) throws FileNotFoundException, IOException{ 
    292300                super.store(file); 
    293301        } 
    294302 
    295         public void store(File file) throws Exception{ 
     303        public void store(File file) throws FileNotFoundException, IOException{ 
    296304                super.store(file); 
    297305        } 
    298306 
    299         public static LyricNote unzip(String file) throws Exception{ 
    300                 return (LyricNote)ImmutableObject.unzip(file); 
    301         } 
    302  
    303         public static LyricNote unzip(File file) throws Exception{ 
    304                 return (LyricNote)ImmutableObject.unzip(file); 
    305         } 
    306  
    307         public void zip(String file) throws Exception{ 
     307        public static LyricNote unzip(String file) throws IOException, ClassNotFoundException{ 
     308                return (LyricNote)BaseObject.unzip(file); 
     309        } 
     310 
     311        public static LyricNote unzip(File file) throws IOException, ClassNotFoundException{ 
     312                return (LyricNote)BaseObject.unzip(file); 
     313        } 
     314 
     315        public void zip(String file) throws IOException{ 
    308316                super.zip(file); 
    309317        } 
    310318 
    311         public void zip(File file) throws Exception{ 
     319        public void zip(File file) throws IOException{ 
    312320                super.zip(file); 
    313321        }