Class PropertyMaps
java.lang.Object
org.micromanager.PropertyMaps
Static methods to create PropertyMap instances.
-
Method Summary
Modifier and TypeMethodDescriptionstatic PropertyMap.Builderbuilder()Returns a builder object for creatingPropertyMapinstances.static PropertyMapReturn the empty property map.static PropertyMapCreate a property map from its JSON-serialized form.static PropertyMapCreate a property map from its JSON-serialized form stored in a file.
-
Method Details
-
builder
Returns a builder object for creatingPropertyMapinstances.Create property maps like this:
PropertyMap myPropertyMap = PropertyMaps.builder(). putString("first name", "Jane"). putString("last name", "Smith"). putInteger("age", 32). build();- Returns:
- a property map builder
-
emptyPropertyMap
Return the empty property map.- Returns:
- empty property map
-
fromJSON
Create a property map from its JSON-serialized form.- Parameters:
json- json formatted String to be converted into a PropertyMap- Returns:
- PropertyMap result from conversion
- Throws:
IOException- ifjsonis invalid JSON or if it does not represent a valid property map
-
loadJSON
Create a property map from its JSON-serialized form stored in a file.- Parameters:
file- File containing the serialized JSON PropertyMap- Returns:
- Deserialized PropertyMap
- Throws:
IOException- if there was a problem readingfileor if the file contained invalid JSON or if the JSON did not represent a valid property mapFileNotFoundException- this subclass ofIOExceptionis thrown iffiledoes not exist
-