a
new CompositeProperty()
Property
由aTimeIntervalCollection
定義,其中每個(gè)TimeInterval
的數(shù)據(jù)屬性是在提供的時(shí)間評(píng)估的另一個(gè)屬性實(shí)例。
Example
var constantProperty = ...;
var sampledProperty = ...;
//Create a composite property from two previously defined properties
//where the property is valid on August 1st, 2012 and uses a constant
//property for the first half of the day and a sampled property for the
//remaining half.
var composite = new bmgl.CompositeProperty();
composite.intervals.addInterval(bmgl.TimeInterval.fromIso8601({
iso8601 : '2012-08-01T00:00:00.00Z/2012-08-01T12:00:00.00Z',
data : constantProperty
}));
composite.intervals.addInterval(bmgl.TimeInterval.fromIso8601({
iso8601 : '2012-08-01T12:00:00.00Z/2012-08-02T00:00:00.00Z',
isStartIncluded : false,
isStopIncluded : false,
data : sampledProperty
}));
Members
(readonly) definitionChanged : Event
獲取每當(dāng)此屬性的定義更改時(shí)引發(fā)的事件。每當(dāng)使用與當(dāng)前值不同的數(shù)據(jù)調(diào)用setvalue時(shí),定義就會(huì)更改。
intervals : TimeIntervalCollection
獲取間隔集合。
(readonly) isConstant : Boolean
獲取一個(gè)值,該值指示此屬性是否為常量。如果getValue總是為當(dāng)前定義返回相同的結(jié)果,則將屬性視為常量。
Methods
equals(other) → {Boolean}
將此屬性與提供的屬性進(jìn)行比較,如果相等,則返回
true
,否則返回false
。
Parameters:
獲取所提供時(shí)間的屬性值。
Parameters:
result
(Object)
將值存儲(chǔ)到的對(duì)象(如果省略),將創(chuàng)建并返回新實(shí)例。