viper.descriptors.attributes
Class Attribute_number.NumberValue
java.lang.Object
java.lang.Number
viper.descriptors.attributes.Attribute_number.NumberValue
- All Implemented Interfaces:
- AttributeValue, java.lang.Comparable, Measurable, java.io.Serializable
- Enclosing class:
- Attribute_number
- protected abstract static class Attribute_number.NumberValue
- extends java.lang.Number
- implements AttributeValue, java.lang.Comparable
- See Also:
- Serialized Form
Methods inherited from class java.lang.Number |
byteValue, doubleValue, floatValue, intValue, longValue, shortValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.lang.Comparable |
compareTo |
Attribute_number.NumberValue
protected Attribute_number.NumberValue()
getDifference
public Measurable.Difference getDifference(Measurable beta,
Measurable blackout,
Measurable ignore,
CanonicalFileDescriptor cfd)
- Description copied from interface:
Measurable
- Not optimized version. Usually will just call
getDifference (..., null)
.
- Specified by:
getDifference
in interface Measurable
- Parameters:
beta
- the value to subtract/get the difference fromblackout
- the bad regionignore
- the ignored regioncfd
- the media's information
- Returns:
- the difference between this and beta, given the constraints
- See Also:
Measurable.getDifference(Measurable, Measurable, Measurable,
CanonicalFileDescriptor, Measurable.Difference)
getDifference
public Measurable.Difference getDifference(Measurable beta,
Measurable blackout,
Measurable ignore,
CanonicalFileDescriptor cfd,
Measurable.Difference old)
- Description copied from interface:
Measurable
- For performance reasons, takes an optional (could be null)
Measurable.Difference to replace the data from.
Calling
getDistance (alpha, beta, blackout, ignore)
should
have the same effect as
getDistance (alpha.getDifference (beta, blackout, ignore))
(Except for if alpha is null... then it will use
Distances.DefaultDifference
- Specified by:
getDifference
in interface Measurable
- Parameters:
beta
- the difference to get againstblackout
- the measurable to count as badignore
- the measurable region to ignorecfd
- the media file descriptorold
- an old difference to copy into, if possible, like the array
passed to list.toArray()
- Returns:
- the difference between this and beta
validate
public boolean validate(AttributeValue v)
- Checks to make sure that the value can be set.
- Specified by:
validate
in interface AttributeValue
- Parameters:
v
- the value to validate
- Returns:
- true iff the value is a valid attribute value for this
attribute's type