Class PropertyUtils
- java.lang.Object
- 
- com.inductiveautomation.ignition.common.config.PropertyUtils
 
- 
 public class PropertyUtils extends java.lang.ObjectSome basic functions that aide our use of properties, or help consolidate logic.
- 
- 
Constructor SummaryConstructors Constructor Description PropertyUtils()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static booleananyModified(VersionedPropertySet diff, Property<?>... props)Returns true if any of the provided properties are marked as modified in the diff.static booleananyModified(VersionedPropertySet diff, java.util.Collection<Property<?>> props)Returns true if any of the provided properties are marked as modified in the diff.static BoundValuebindParameterReference(java.lang.Object value)static <T> Tcoerce(Property<T> target, java.lang.Object value)Attempts to coerce the provided value into the type expected by the provided property.static java.lang.ObjectcoerceUnchecked(Property<?> target, java.lang.Object value)This version of coerce does not return a generic type, and also will return a string if the incoming value appears to be a reference.static java.util.Set<Property<?>>getModifiedProperties(PropertySet original, PropertySet newSet)static QualifiedValuegetPotentiallyBoundDisplayValue(PropertySet props, Property<?> prop)static java.lang.StringgetReferenceAsString(java.lang.Object value)static booleanisDefault(Property<?> property, java.lang.Object value)Returns true if the value is *essentially* equal to the default value of the property.static booleanisReference(java.lang.Object value)static voidsetPotentialParameterBoundValue(PropertySet props, Property<?> prop, java.lang.Object value)Works with potentially non-bindable propertyset, and strings that may not have references.static <T extends Property<?>>
 T[]values(java.lang.Class<?> classToSearch, java.lang.Class<? extends T> propType)Searches the provided class for static Property values and returns them as an array.
 
- 
- 
- 
Method Detail- 
coercepublic static <T> T coerce(Property<T> target, java.lang.Object value) throws PropertyTypeException Attempts to coerce the provided value into the type expected by the provided property.- Throws:
- PropertyTypeException
 
 - 
coerceUncheckedpublic static java.lang.Object coerceUnchecked(Property<?> target, java.lang.Object value) throws PropertyTypeException This version of coerce does not return a generic type, and also will return a string if the incoming value appears to be a reference.- Throws:
- PropertyTypeException
 
 - 
isDefaultpublic static boolean isDefault(Property<?> property, java.lang.Object value) Returns true if the value is *essentially* equal to the default value of the property. "Essentially" means normal equality, but also, Empty List or PropertySet to null and vice versa.
 - 
valuespublic static <T extends Property<?>> T[] values(java.lang.Class<?> classToSearch, java.lang.Class<? extends T> propType) Searches the provided class for static Property values and returns them as an array. Does not return null.- Parameters:
- classToSearch- the class that has static property definitions
- propType- the class type of the properties.
 
 - 
getReferenceAsStringpublic static java.lang.String getReferenceAsString(java.lang.Object value) 
 - 
isReferencepublic static boolean isReference(java.lang.Object value) 
 - 
bindParameterReferencepublic static BoundValue bindParameterReference(java.lang.Object value) 
 - 
setPotentialParameterBoundValuepublic static void setPotentialParameterBoundValue(PropertySet props, Property<?> prop, java.lang.Object value) Works with potentially non-bindable propertyset, and strings that may not have references. If not a reference, will try to coerce into correct value.
 - 
getPotentiallyBoundDisplayValuepublic static QualifiedValue getPotentiallyBoundDisplayValue(PropertySet props, Property<?> prop) 
 - 
anyModifiedpublic static boolean anyModified(VersionedPropertySet diff, Property<?>... props) Returns true if any of the provided properties are marked as modified in the diff.
 - 
anyModifiedpublic static boolean anyModified(VersionedPropertySet diff, java.util.Collection<Property<?>> props) Returns true if any of the provided properties are marked as modified in the diff.
 - 
getModifiedPropertiespublic static java.util.Set<Property<?>> getModifiedProperties(PropertySet original, PropertySet newSet) 
 
- 
 
-