- 更新日時:
- 2010/05/11 20:15:55 (2 年 前)
- パス:
- trunk/src/org/rayflood/mikuvat/io/vsq
- ファイル:
-
- 1 追加
- 1 移動
-
. (追加)
-
MasterSection.java (移動) (移動元: trunk/src/org/rayflood/mikuvat/io/MasterSection.java) (4 diff)
凡例:
- 変更なし
- 追加
- 削除
-
trunk/src/org/rayflood/mikuvat/io/vsq/MasterSection.java
r2 r4 1 package org.rayflood.mikuvat.io ;1 package org.rayflood.mikuvat.io.vsq; 2 2 3 import static org.rayflood.mikuvat. io.VSQDecoder.adjustMaxMin;4 import static org.rayflood.mikuvat. io.VSQDecoder.splitEqual;3 import static org.rayflood.mikuvat.Utilities.adjustMaxMin; 4 import static org.rayflood.mikuvat.Utilities.splitEqual; 5 5 6 6 import java.io.File; 7 import java.io.FileNotFoundException; 8 import java.io.IOException; 7 9 import java.util.ArrayList; 8 10 import java.util.List; 9 11 10 public class MasterSection extends ImmutableObject{ 12 import org.rayflood.mikuvat.io.BaseObject; 13 import org.rayflood.mikuvat.io.InvalidBaseObjectException; 14 15 public class MasterSection extends BaseObject{ 11 16 private static final long serialVersionUID = 3680414369532973128L; 12 17 … … 44 49 } 45 50 46 StringBu ffer sb = new StringBuffer();51 StringBuilder sb = new StringBuilder(); 47 52 sb.append("MasterSection={"); 48 53 if(!sl.isEmpty()){ … … 56 61 } 57 62 58 public boolean isReadied(){63 public boolean validate() throws InvalidBaseObjectException{ 59 64 boolean ready = true; 60 65 ready &= hasPreMeasure(); 66 if(!ready){ 67 throw new InvalidBaseObjectException(this); 68 } 61 69 return ready; 62 70 } 63 71 64 public int compareTo( ImmutableObject obj){72 public int compareTo(BaseObject obj){ 65 73 MasterSection masterSection = (MasterSection)obj; 66 74 return compare(this.getPreMeasure(), masterSection.getPreMeasure()); 67 75 } 68 76 69 public MasterSection over( Object obj, boolean fill, boolean has){77 public MasterSection over(BaseObject obj, boolean fill, boolean has){ 70 78 MasterSection masterSection = ((MasterSection)obj).clone(); 71 79 if(masterSection.hasPreMeasure() && (fill || has == hasPreMeasure())){ … … 129 137 } 130 138 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); 133 141 } 134 142 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); 137 145 } 138 146 139 public void store(String file) throws Exception{147 public void store(String file) throws FileNotFoundException, IOException{ 140 148 super.store(file); 141 149 } 142 150 143 public void store(File file) throws Exception{151 public void store(File file) throws FileNotFoundException, IOException{ 144 152 super.store(file); 145 153 } 146 154 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); 149 157 } 150 158 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); 153 161 } 154 162 155 public void zip(String file) throws Exception{163 public void zip(String file) throws IOException{ 156 164 super.zip(file); 157 165 } 158 166 159 public void zip(File file) throws Exception{167 public void zip(File file) throws IOException{ 160 168 super.zip(file); 161 169 }
