viper.descriptors.attributes
Class ValueSpan

java.lang.Object
  extended byviper.descriptors.attributes.ValueSpan

public class ValueSpan
extends java.lang.Object

Encodes a dynamic attribute value.


Constructor Summary
ValueSpan(AttributeValue v, long s, long e)
          Creates a new instance of ValueSpan.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Checks that the value and times are equals.
 long getEnd()
          Gets the last frame.
 long getStart()
          Gets the first frame of the value.
 AttributeValue getValue()
          Gets the start of the value.
 int hashCode()
           
 java.lang.String toString()
          Prints the value in .gtf format.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValueSpan

public ValueSpan(AttributeValue v,
                 long s,
                 long e)
Creates a new instance of ValueSpan.

Parameters:
v - the value for the span
s - the first valid frame/nano
e - the last valid frame/nano
Throws:
java.lang.IllegalArgumentException - when s > e
Method Detail

equals

public boolean equals(java.lang.Object obj)
Checks that the value and times are equals.

Parameters:
obj - the Object with which to compare this
Returns:
false if not a ValueSpan with the same value and span

hashCode

public int hashCode()
Returns:
the xor of the start and end frames, with the value itself

toString

public java.lang.String toString()
Prints the value in .gtf format.

Returns:
the value in .gtf format

getValue

public AttributeValue getValue()
Gets the start of the value.

Returns:
the value

getStart

public long getStart()
Gets the first frame of the value.

Returns:
the first frame/nano

getEnd

public long getEnd()
Gets the last frame.

Returns:
the last frame