Interface PropertyValueSource
- All Known Subinterfaces:
- AlarmDefinition,- AlarmEvent,- AuthenticatedUser,- BoundPropertySet,- MutablePropertyValueSource,- NotificationContext,- ObservablePropertySet,- ObservablePropertySource,- PropertySet,- PropertySetEdit,- PyAlarmEvent,- QualifiedValuePropertySet,- QualifiedValuePropertySource,- TagConfiguration,- TagConfigurationModel,- TagEditController<T>,- TagGroup,- User,- VersionedPropertySet
- All Known Implementing Classes:
- AbstractExtendedPropertySet,- ADSSOAuthChallenge,- AlarmDefinitionConfig,- AlarmDefinitionDiff,- AlarmEventInstance,- AuthChallenge,- BadgeAuthChallenge,- BasicAlarmDefinition,- BasicAlarmEvent,- BasicAuthChallenge,- BasicAuthenticatedUser,- BasicBoundPropertySet,- BasicPropertySet,- BasicTagConfiguration,- BasicTagConfigurationModel,- BasicTagEditController,- BasicUser,- BasicVersionedPropertySet,- BoundExtendedPropertySet,- BoundPropertySetConfig,- BoundPropertySetDiff,- ChartUIElement,- ComplexTagDefinition,- ComplexTagDiff,- CompositePropertySet,- DelegatePropertySet,- EventData,- ExtendedAlarmDefinition,- ExtendedPropertySet,- IdentityTraits,- ImmutablePropertySet,- IntersectedAlarmDefinition,- IntersectedBoundPropertySet,- IntersectedPropertySet,- IntersectedTagConfig,- IntersectedTagEditModel,- NodeDescription,- PipelineDescriptor,- PropertySetConfig,- PropertySetDiff,- PyAlarmEventImpl,- PyUser,- StorageTagConfiguration,- TagDefinition,- TagDiff,- TagEditResources,- TagPropertySetWrapper,- UnfilteredEventData
public interface PropertyValueSource
This interface represents a specific subset of functionality implemented by most property holders (such as
 
PropertySet), used to retrieve property values.- 
Method SummaryModifier and TypeMethodDescriptionboolean<T> TRetrieves the value of the property, or null if this set doesn't contain that property.default <T> TgetNonNull(Property<T> prop, Supplier<T> supplier) The value for prop if it exists and is not null.default <T> TgetNonNull(Property<T> prop, T value) The value for prop if it exists and is not null.default <T> TgetOrDefault(Property<T> prop) <T> TGet the value for a givenProperty, or else fall back to value if it's not present.Collection<Property<?>>default List<PropertyValue>Returns the opaque PropertyValue objects.
- 
Method Details- 
getPropertiesCollection<Property<?>> getProperties()
- 
getValuesReturns the opaque PropertyValue objects. This can be useful when you want to avoid the strict type checking of the value, and it's important to note that if the property is bound, the value will be a BoundValue. Be very careful about overriding, and make sure to maintain the methodology of using getProperties to iterate and get (or getOrDefault), to get the value, because those are all handled differently by BoundPropertySets, ExtendedPropertySets, etc.
- 
getRetrieves the value of the property, or null if this set doesn't contain that property.
- 
contains- Returns:
- True if the source contains a value for prop.
 
- 
getOrDefault- Returns:
- The value for prop or Property.getDefaultValue()if not present. Can return null if the value is null.
 
- 
getOrElseGet the value for a givenProperty, or else fall back to value if it's not present.- Parameters:
- prop- The- Propertyfor which a value is to be retrieved.
- value- The value to default to if property isn't present.
- Returns:
- The value of property if present, value if not. Can return null if the value is null.
 
- 
getNonNullThe value for prop if it exists and is not null. Otherwise returnsProperty.getDefaultValue()if that exists and is not null. Finally will fallback to value.- Parameters:
- prop- The- Propertyfor which a value is to be retrieved.
- value- The value to default to if property isn't present or returns null and has no default.
- Returns:
- The value of property if present and non-null, otherwise
              Property.getDefaultValue()if non-null, otherwise value if neither is present and non-null
 
- 
getNonNullThe value for prop if it exists and is not null. Otherwise returnsProperty.getDefaultValue()if that exists and is not null. Finally will fallback to value.- Parameters:
- prop- The- Propertyfor which a value is to be retrieved.
- supplier- The supplier of a default value to use if property isn't present or returns null and has no default. Supplier must not return null.
- Returns:
- The value of property if present and non-null, otherwise
                 Property.getDefaultValue()if non-null, otherwise value if neither is present and non-null
 
 
-