public class Hole extends java.lang.Object implements java.lang.Comparable<Hole>, java.io.Serializable, ITimedStamped, ITimedLength
| Constructor and Description |
|---|
Hole(Hole n)
Copy Constructor
|
Hole(int track,
long timestamp,
long length)
Constructor of hole, given the track no, the timestamp and length (time are in microseconds)
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Hole o) |
boolean |
equals(java.lang.Object obj) |
long |
getTimeLength()
length of the hole in microseconds
|
long |
getTimestamp()
Time of the start of the Hole (in Microseconds since the beginning of the
Book)
|
int |
getTrack()
Get the track of the hole
|
int |
hashCode() |
static Hole |
intersect(Hole a,
Hole b)
get the intersection between two holes
|
boolean |
intersect(Region r)
function that return intersection with a region
|
static boolean |
isIn(Hole a,
Hole b)
Teste si la note a est complètement à l'intérieur de b
|
static boolean |
isIntersect(Hole a,
Hole b)
are two holes intersecting ?
|
static Hole[] |
minus(Hole a,
Hole b)
Construit l'expression a - b
|
Hole |
newHoleWithMinimumLength(long minimumLength)
create a new hole with a minimum length
|
Hole |
newHoleWithOffset(long timestamp)
Create a new hole and use an offset
|
java.lang.String |
toString() |
static Hole |
union(Hole a,
Hole b)
merge two holes (union operator)
|
public Hole(int track,
long timestamp,
long length)
track - hole tracktimestamp - timestamp in microsecondlength - length of the hole in microsecondpublic Hole(Hole n)
n - hole to copypublic long getTimeLength()
getTimeLength in interface ITimedLengthpublic int getTrack()
public long getTimestamp()
getTimestamp in interface ITimedStampedpublic boolean intersect(Region r)
r - public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic final int compareTo(Hole o)
compareTo in interface java.lang.Comparable<Hole>public static final boolean isIntersect(Hole a, Hole b)
a - la première noteb - la seconde notepublic static Hole intersect(Hole a, Hole b)
a - first holeb - second holepublic static Hole union(Hole a, Hole b)
a - first holeb - second holepublic static boolean isIn(Hole a, Hole b)
a - la première noteb - la note de testpublic static Hole[] minus(Hole a, Hole b)
a - la note de departb - la note de soustractionpublic Hole newHoleWithOffset(long timestamp)
timestamp - public Hole newHoleWithMinimumLength(long minimumLength)
minimumLength -