- 更新日時:
- 2010/05/11 20:15:55 (2 年 前)
- パス:
- trunk/src/org/rayflood/mikuvat/io/vsq
- ファイル:
-
- 1 追加
- 1 移動
-
. (追加)
-
MixerSetting.java (移動) (移動元: trunk/src/org/rayflood/mikuvat/io/MixerSetting.java) (6 diff)
凡例:
- 変更なし
- 追加
- 削除
-
trunk/src/org/rayflood/mikuvat/io/vsq/MixerSetting.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.getBooleanValue;5 import static org.rayflood.mikuvat. io.VSQDecoder.getStringValue;1 package org.rayflood.mikuvat.io.vsq; 2 3 import static org.rayflood.mikuvat.Utilities.adjustMaxMin; 4 import static org.rayflood.mikuvat.Utilities.getBooleanValue; 5 import static org.rayflood.mikuvat.Utilities.getStringValue; 6 6 7 7 import java.io.File; 8 import java.io.FileNotFoundException; 9 import java.io.IOException; 8 10 import java.util.ArrayList; 9 11 import java.util.List; 10 12 11 public class MixerSetting extends ImmutableObject{ 13 import org.rayflood.mikuvat.io.BaseObject; 14 import org.rayflood.mikuvat.io.InvalidBaseObjectException; 15 16 public class MixerSetting extends BaseObject{ 12 17 private static final long serialVersionUID = -4879364127354448647L; 13 18 private Integer feder; … … 47 52 } 48 53 49 StringBu ffer sb = new StringBuffer();54 StringBuilder sb = new StringBuilder(); 50 55 sb.append("MixerSetting={"); 51 56 if(!sl.isEmpty()){ … … 59 64 } 60 65 61 public boolean isReadied(){66 public boolean validate() throws InvalidBaseObjectException{ 62 67 boolean ready = true; 63 68 ready &= hasFeder(); … … 65 70 ready &= hasMute(); 66 71 ready &= hasSolo(); 72 if(!ready){ 73 throw new InvalidBaseObjectException(this); 74 } 67 75 return ready; 68 76 } 69 77 70 public int compareTo( ImmutableObject obj){78 public int compareTo(BaseObject obj){ 71 79 MixerSetting mixerSetting = (MixerSetting)obj; 72 80 int c = compare(getFeder(), mixerSetting.getFeder()); … … 83 91 } 84 92 85 public MixerSetting over( Object obj, boolean fill, boolean has){93 public MixerSetting over(BaseObject obj, boolean fill, boolean has){ 86 94 MixerSetting mixerSetting = ((MixerSetting)obj).clone(); 87 95 if(mixerSetting.hasFeder() && (fill || has == hasFeder())){ … … 235 243 } 236 244 237 public static MixerSetting load(String file) throws Exception{238 return (MixerSetting) ImmutableObject.load(file);239 } 240 241 public static MixerSetting load(File file) throws Exception{242 return (MixerSetting) ImmutableObject.load(file);243 } 244 245 public void store(String file) throws Exception{245 public static MixerSetting load(String file) throws FileNotFoundException, IOException, ClassNotFoundException{ 246 return (MixerSetting)BaseObject.load(file); 247 } 248 249 public static MixerSetting load(File file) throws FileNotFoundException, IOException, ClassNotFoundException{ 250 return (MixerSetting)BaseObject.load(file); 251 } 252 253 public void store(String file) throws FileNotFoundException, IOException{ 246 254 super.store(file); 247 255 } 248 256 249 public void store(File file) throws Exception{257 public void store(File file) throws FileNotFoundException, IOException{ 250 258 super.store(file); 251 259 } 252 260 253 public static MixerSetting unzip(String file) throws Exception{254 return (MixerSetting) ImmutableObject.unzip(file);255 } 256 257 public static MixerSetting unzip(File file) throws Exception{258 return (MixerSetting) ImmutableObject.unzip(file);259 } 260 261 public void zip(String file) throws Exception{261 public static MixerSetting unzip(String file) throws IOException, ClassNotFoundException{ 262 return (MixerSetting)BaseObject.unzip(file); 263 } 264 265 public static MixerSetting unzip(File file) throws IOException, ClassNotFoundException{ 266 return (MixerSetting)BaseObject.unzip(file); 267 } 268 269 public void zip(String file) throws IOException{ 262 270 super.zip(file); 263 271 } 264 272 265 public void zip(File file) throws Exception{273 public void zip(File file) throws IOException{ 266 274 super.zip(file); 267 275 }
