- 更新日時:
- 2010/05/11 20:15:55 (2 年 前)
- パス:
- trunk/src/org/rayflood/mikuvat/io/vsq
- ファイル:
-
- 1 追加
- 1 移動
-
. (追加)
-
EventBPTime.java (移動) (移動元: trunk/src/org/rayflood/mikuvat/io/EventBPTime.java) (5 diff)
凡例:
- 変更なし
- 追加
- 削除
-
trunk/src/org/rayflood/mikuvat/io/vsq/EventBPTime.java
r2 r4 1 package org.rayflood.mikuvat.io ;2 3 import static org.rayflood.mikuvat. io.VSQDecoder.adjustMaxMin;1 package org.rayflood.mikuvat.io.vsq; 2 3 import static org.rayflood.mikuvat.Utilities.adjustMaxMin; 4 4 5 5 import java.io.File; 6 import java.io.FileNotFoundException; 7 import java.io.IOException; 6 8 import java.util.ArrayList; 7 9 import java.util.List; 8 10 9 public class EventBPTime extends ImmutableObject{ 11 import org.rayflood.mikuvat.io.BaseObject; 12 import org.rayflood.mikuvat.io.InvalidBaseObjectException; 13 14 public class EventBPTime extends BaseObject{ 10 15 private static final long serialVersionUID = 817431318781476681L; 11 16 public static final int PITCHBEND_MAX = 8191; … … 144 149 } 145 150 146 StringBu ffer sb = new StringBuffer();151 StringBuilder sb = new StringBuilder(); 147 152 sb.append("EventBPTime={"); 148 153 if(!sl.isEmpty()){ … … 156 161 } 157 162 158 public boolean isReadied(){ 159 return !hasEvent() || getEvent().isReadied(); 160 } 161 162 public int compareTo(ImmutableObject obj){ 163 public boolean validate() throws InvalidBaseObjectException{ 164 boolean ready = true; 165 ready &= !hasEvent() || getEvent().validate(); 166 if(!ready){ 167 throw new InvalidBaseObjectException(this); 168 } 169 return ready; 170 } 171 172 public int compareTo(BaseObject obj){ 163 173 EventBPTime eventBPTime = (EventBPTime)obj; 164 174 int c = compare(getDynamics(), eventBPTime.getDynamics()); … … 201 211 } 202 212 203 public EventBPTime over( Object obj, boolean fill, boolean has){213 public EventBPTime over(BaseObject obj, boolean fill, boolean has){ 204 214 EventBPTime eventBPTime = ((EventBPTime)obj).clone(); 205 215 if(eventBPTime.hasEvent()){ … … 889 899 } 890 900 891 public static EventBPTime load(String file) throws Exception{892 return (EventBPTime) ImmutableObject.load(file);893 } 894 895 public static EventBPTime load(File file) throws Exception{896 return (EventBPTime) ImmutableObject.load(file);897 } 898 899 public void store(String file) throws Exception{901 public static EventBPTime load(String file) throws FileNotFoundException, IOException, ClassNotFoundException{ 902 return (EventBPTime)BaseObject.load(file); 903 } 904 905 public static EventBPTime load(File file) throws FileNotFoundException, IOException, ClassNotFoundException{ 906 return (EventBPTime)BaseObject.load(file); 907 } 908 909 public void store(String file) throws FileNotFoundException, IOException{ 900 910 super.store(file); 901 911 } 902 912 903 public void store(File file) throws Exception{913 public void store(File file) throws FileNotFoundException, IOException{ 904 914 super.store(file); 905 915 } 906 916 907 public static EventBPTime unzip(String file) throws Exception{908 return (EventBPTime) ImmutableObject.unzip(file);909 } 910 911 public static EventBPTime unzip(File file) throws Exception{912 return (EventBPTime) ImmutableObject.unzip(file);913 } 914 915 public void zip(String file) throws Exception{917 public static EventBPTime unzip(String file) throws IOException, ClassNotFoundException{ 918 return (EventBPTime)BaseObject.unzip(file); 919 } 920 921 public static EventBPTime unzip(File file) throws IOException, ClassNotFoundException{ 922 return (EventBPTime)BaseObject.unzip(file); 923 } 924 925 public void zip(String file) throws IOException{ 916 926 super.zip(file); 917 927 } 918 928 919 public void zip(File file) throws Exception{929 public void zip(File file) throws IOException{ 920 930 super.zip(file); 921 931 }
