Package org.eclipse.birt.report.model.api.elements.structures

# Class TimeInterval

java.lang.Object
org.eclipse.birt.report.model.core.Structure
org.eclipse.birt.report.model.api.elements.structures.TimeInterval

All Implemented Interfaces:
  `Cloneable`, `IStructure`, `org.eclipse.birt.report.model.core.IPropertySet`

public class TimeInterval extends org.eclipse.birt.report.model.core.Structure
Time interval structure.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected int`
`measure`
Value of the measure.
`static final String`
`MEASURE_MEMBER`
Name of the measure member.
`static final String`
`STRUCTURE_NAME`
Name of the structure.
`protected String`
`unit`
Value of the unit.
`static final String`
`UNIT_MEMBER`
Name of the unit member.

## Constructor Summary

Constructors
Constructor
Description
`TimeInterval()`

## Method Summary

Modifier and Type
Method
Description
`StructureHandle`
`getHandle(SimpleValueHandle valueHandle)`
Gets the specific handle of this structure.
`protected Object`
`getIntrinsicProperty(String propName)`
Returns the value of a structure property represented as a member variable.
`int`
`getMeasure()`
Returns the measure value.
`String`
`getStructName()`
Returns the name of the structure definition.
`String`
`getUnit()`
Returns the unit of the time interval.
`protected StructureHandle`
`handle(SimpleValueHandle valueHandle, int index)`
Creates the specific handle of this structure.
`protected void`
`setIntrinsicProperty(String propName, Object value)`
Sets the value of of a structure property represented as a member variable.
`void`
`setMeasure(int measure)`
Sets the measure value.
`void`
`setUnit(String unit)`
Sets the unit of the time interval.

### Methods inherited from class org.eclipse.birt.report.model.core.Structure

`checkStringMember, copy, equals, getCompatibleValue, getContext, getDefn, getElement, getExpressionProperty, getHandle, getLocalProperty, getLocalProperty, getMemberDefn, getObjectDefn, getProperty, getProperty, getReferencableProperty, getStringProperty, isDesignTime, isReferencable, setContext, setExpressionProperty, setProperty, setProperty, setupContext, updateReference, validate`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### STRUCTURE_NAME

public static final String STRUCTURE_NAME
Name of the structure.

See Also:
  - Constant Field Values

### MEASURE_MEMBER

public static final String MEASURE_MEMBER
Name of the measure member.

See Also:
  - Constant Field Values

### UNIT_MEMBER

public static final String UNIT_MEMBER
Name of the unit member.

See Also:
  - Constant Field Values

### measure

protected int measure
Value of the measure.

### unit

protected String unit
Value of the unit.

## Constructor Details

### TimeInterval

public TimeInterval()

## Method Details

### getStructName

public String getStructName()
Description copied from interface: `IStructure`
Returns the name of the structure definition. The name is the one used to define the structure in the meta-data dictionary.

Returns:
  the internal name of the structure a defined in the meta-data dictionary.

### getIntrinsicProperty

protected Object getIntrinsicProperty(String propName)
Description copied from class: `org.eclipse.birt.report.model.core.Structure`
Returns the value of a structure property represented as a member variable.

Specified by:
  `getIntrinsicProperty` in class `org.eclipse.birt.report.model.core.Structure`
Parameters:
  `propName` - name of the property
Returns:
  the value of the property, or null if the property is not set

### setIntrinsicProperty

protected void setIntrinsicProperty(String propName, Object value)
Description copied from class: `org.eclipse.birt.report.model.core.Structure`
Sets the value of of a structure property represented as a member variable.

Specified by:
  `setIntrinsicProperty` in class `org.eclipse.birt.report.model.core.Structure`
Parameters:
  `propName` - the name of the property to set
  `value` - the property value

### handle

protected StructureHandle handle(SimpleValueHandle valueHandle, int index)
Description copied from class: `org.eclipse.birt.report.model.core.Structure`
Creates the specific handle of this structure. This handle is always created.

Specified by:
  `handle` in class `org.eclipse.birt.report.model.core.Structure`
Parameters:
  `valueHandle` - the value handle of this structure list property this structure is in
  `index` - the position of this structure in structure list
Returns:
  the handle of this structure.

### getHandle

public StructureHandle getHandle(SimpleValueHandle valueHandle)
Description copied from class: `org.eclipse.birt.report.model.core.Structure`
Gets the specific handle of this structure. This structure must be in the element's structure list. The structure handle is transient because the position in the structure list is kept. The position changes if any structure is added, or dropped. So this handle should not be kept.

Overrides:
  `getHandle` in class `org.eclipse.birt.report.model.core.Structure`
Parameters:
  `valueHandle` - the value handle of this structure list property this structure is in
Returns:
  the handle of this structure. If this structure is not in the `valueHandle`,`null` is returned.

### setMeasure

public void setMeasure(int measure)
Sets the measure value.

Parameters:
  `measure` - the measure value to set

### getMeasure

public int getMeasure()
Returns the measure value.

Returns:
  the measure value

### setUnit

public void setUnit(String unit)
Sets the unit of the time interval. The value can one of the following value defined in `DesignChoiceConstants`:

- `INTERVAL_SECOND`
- `INTERVAL_MINUTE`
- `INTERVAL_HOUR`

Parameters:
  `unit` - the unit to set

### getUnit

public String getUnit()
Returns the unit of the time interval. The value can be one of the following value defined in `DesignChoiceConstants`:

- `INTERVAL_SECOND`
- `INTERVAL_MINUTE`
- `INTERVAL_HOUR`

Returns:
  the unit