com.starteam
Class DoubleProperty

java.lang.Object
  extended by com.starteam.Property
      extended by com.starteam.ScalarProperty
          extended by com.starteam.DoubleProperty
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
Requirement.Type.OrderProperty, Requirement.Type.RankProperty, Story.Type.EstimatedPointsProperty, Story.Type.RankProperty, Story.Type.StoryOrderProperty, Task.Type.EstimatedHoursVarianceProperty, Task.Type.OrderProperty

public class DoubleProperty
extends ScalarProperty

This class represents a property whose value is a double.


Nested Class Summary
static class DoubleProperty.WebCacheDoubleProperty
          Base accessor for cached SDK objects encapsulating the statefulness of objects obtained from the artifact cache.
 
Nested classes/interfaces inherited from class com.starteam.ScalarProperty
ScalarProperty.WebCacheScalarProperty
 
Nested classes/interfaces inherited from class com.starteam.Property
Property.MetaData, Property.WebCacheProperty
 
Field Summary
static double MAX_VALUE
          The maximum legal value of a DoubleProperty.
static double MIN_VALUE
          The minimum legal value of a DoubleProperty.
 
Method Summary
 double getDefaultValue()
          Returns the default double value for this Property
 java.lang.String getDisplayValue(java.lang.Object value)
          Converts the given property value to a string suitable for display.
 java.lang.Object getGenericMaxValue()
          Gets the maximum allowable value of this property.
 java.lang.Object getGenericMinValue()
          Gets the minimum allowable value of this property.
 double getMaxValue()
          Returns the maximum double value for this Property or MAX_VALUE if none has been specified
 double getMinValue()
          Returns the minimum double value for this Property or MIN_VALUE if none has been specified
 boolean isRollupProperty()
          Returns true if this Double Property is a rollup property The value of this property on a parent tree item would be the summation of the values of all its children This feature was introduced in the 14.0 server
 QueryPart newQueryPart(QueryPart.Relation relation, double value)
          Creates a new query expression that tests this property.
 void setDefaultValue(double value)
          Sets the default double value for this Property
 void setMaxValue(double value)
          Sets the maximum double value for this Property
 void setMinValue(double value)
          Sets the minimum double value for this Property
 void setRollupProperty(boolean enable)
          set this property to be a rollup property
 TimeSpanProperty toTimeSpanProperty(TimeSpan units)
          Converts this DoubleProperty to a TimeSpanProperty.
 void update()
          If this property is new or dirty, saves changes to the repository
 
Methods inherited from class com.starteam.ScalarProperty
setGenericMaxValue, setGenericMinValue
 
Methods inherited from class com.starteam.Property
areValuesEqual, copy, equals, getDebugString, getDependentProperties, getDisplayName, getDisplayNameTranslations, getGenericDefaultValue, getID, getName, getServer, getType, hashCode, isAdvanced, isCalculated, isClientCalculated, isDescriptor, isDirty, isDisabled, isEnabled, isEqualTo, isGenericCalculated, isHeader, isItemProperty, isLegalValue, isNew, isPrimaryDescriptor, isQueryRelationSupported, isRequired, isRestricted, isRevisionIndependent, isServerCalculated, isSortByTextValueSupported, isStored, isSysDefined, isUserCustomized, isUserDefined, isUserModifiable, isViewSpecific, resolveAllDependencies, setDescriptor, setDisplayName, setDisplayNameTranslations, setEnabled, setGenericDefaultValue, setPrimaryDescriptor, setRequired, toString, toXml
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MIN_VALUE

public static final double MIN_VALUE
The minimum legal value of a DoubleProperty. Note that this value is currently -1e126, which is more restrictive than Double.MIN_VALUE.

See Also:
Constant Field Values

MAX_VALUE

public static final double MAX_VALUE
The maximum legal value of a DoubleProperty. Note that this value is currently 1e126, which is more restrictive than Double.MAX_VALUE.

See Also:
Constant Field Values
Method Detail

getDefaultValue

public double getDefaultValue()
Returns the default double value for this Property

Returns:
the default double value

setDefaultValue

public void setDefaultValue(double value)
Sets the default double value for this Property

Parameters:
value - double

getMinValue

public double getMinValue()
Returns the minimum double value for this Property or MIN_VALUE if none has been specified

Returns:
double

setMinValue

public void setMinValue(double value)
Sets the minimum double value for this Property

Parameters:
value - double

getMaxValue

public double getMaxValue()
Returns the maximum double value for this Property or MAX_VALUE if none has been specified

Returns:
double

setMaxValue

public void setMaxValue(double value)
Sets the maximum double value for this Property

Parameters:
value - double

getGenericMinValue

public java.lang.Object getGenericMinValue()
Gets the minimum allowable value of this property.

Overrides:
getGenericMinValue in class ScalarProperty
Returns:
The minimum allowable value of this property.
See Also:
IntegerProperty.getMinValue(), DoubleProperty.getMinValue(), DateProperty.getMinValue(), DateTimeProperty.getMinValue(), LongIntegerProperty.getMinValue(), TimeSpanProperty.getMinValue()

getGenericMaxValue

public java.lang.Object getGenericMaxValue()
Gets the maximum allowable value of this property.

Overrides:
getGenericMaxValue in class ScalarProperty
Returns:
The maximum allowable value of this property.
See Also:
IntegerProperty.getMaxValue(), DoubleProperty.getMaxValue(), DateProperty.getMaxValue(), DateTimeProperty.getMaxValue(), LongIntegerProperty.getMaxValue(), TimeSpanProperty.getMaxValue()

isRollupProperty

public boolean isRollupProperty()
Returns true if this Double Property is a rollup property The value of this property on a parent tree item would be the summation of the values of all its children This feature was introduced in the 14.0 server

Returns:
true if this Double Property can be rolled up

setRollupProperty

public void setRollupProperty(boolean enable)
set this property to be a rollup property

Parameters:
enable - true to set this property to be a rollup property

newQueryPart

public QueryPart newQueryPart(QueryPart.Relation relation,
                              double value)
Creates a new query expression that tests this property.

Parameters:
relation - The query relation.
value - The value to be tested.
Returns:
A new query expression.

getDisplayValue

public java.lang.String getDisplayValue(java.lang.Object value)
Converts the given property value to a string suitable for display.

Specified by:
getDisplayValue in class Property
Parameters:
value - A legal value for this property.
Returns:
A string representation of the value

toTimeSpanProperty

public TimeSpanProperty toTimeSpanProperty(TimeSpan units)
Converts this DoubleProperty to a TimeSpanProperty.

The old DoubleProperty is replaced by the new TimeSpanProperty within the properties collection of the parent Type. The new property is dirty; to save changes, you must call Property.update(). The old property is invalid and should be discarded.

Parameters:
units - The amount of time represented by the value 1.0, as stored in the repository
Returns:
The converted TimeSpanProperty.
See Also:
TimeSpanProperty, Property.WebCacheProperty.update()

update

public void update()
If this property is new or dirty, saves changes to the repository

Overrides:
update in class Property


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.