Class StringValue
java.lang.Object
com.github.robtimus.os.windows.registry.RegistryValue
com.github.robtimus.os.windows.registry.SettableRegistryValue
com.github.robtimus.os.windows.registry.StringValue
A representation of string registry values.
Instances of this class are immutable.
- Author:
- Rob Spoor
-
Nested Class Summary
Nested classes/interfaces inherited from class RegistryValue
RegistryValue.Filter -
Field Summary
Fields inherited from class RegistryValue
DEFAULT -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic StringValueexpandableOf(String name, String value) Creates a new string registry value.Returns the registry value's expanded string value.inthashCode()booleanReturns whether or not this registry value is an expandable string registry value.static StringValueCreates a new string registry value.toString()value()Returns the registry value's string value.withExpandableValue(String value) Returns a registry value with the same name as this registry value but a different value.Returns a registry value with the same value as this registry value but a different name.Returns a registry value with the same name as this registry value but a different value.Methods inherited from class RegistryValue
filter, name
-
Method Details
-
of
Creates a new string registry value.- Parameters:
name- The name of the registry value.value- The registry value's string value.- Returns:
- The created string registry value.
- Throws:
NullPointerException- If the given name or value isnull.
-
expandableOf
Creates a new string registry value.- Parameters:
name- The name of the registry value.value- The registry value's string value.- Returns:
- The created string registry value.
- Throws:
NullPointerException- If the given name or value isnull.
-
value
Returns the registry value's string value. For expandable string registry values, this is the unexpanded value. UseexpandedValue()for the expanded value.- Returns:
- The registry value's string value.
-
isExpandable
public boolean isExpandable()Returns whether or not this registry value is an expandable string registry value. If so, its value can be expanded.- Returns:
trueif this registry value is an expandable string registry value, orfalseotherwise.- See Also:
-
expandedValue
Returns the registry value's expanded string value.- Returns:
- The registry value's expanded string value.
- Throws:
IllegalStateException- If this registry value is notexpandable.
-
withName
Description copied from class:SettableRegistryValueReturns a registry value with the same value as this registry value but a different name.- Specified by:
withNamein classSettableRegistryValue- Parameters:
name- The name of the registry value to return.- Returns:
- A registry value with the same value as this registry value and the given name.
-
withValue
Returns a registry value with the same name as this registry value but a different value. This registry value will not beexpandable.- Parameters:
value- The value of the registry value to return.- Returns:
- A registry value with the same name as this registry value and the given value.
- Throws:
NullPointerException- If the given value isnull.
-
withExpandableValue
Returns a registry value with the same name as this registry value but a different value. This registry value will beexpandable.- Parameters:
value- The value of the registry value to return.- Returns:
- A registry value with the same name as this registry value and the given value.
- Throws:
NullPointerException- If the given value isnull.
-
equals
- Overrides:
equalsin classRegistryValue
-
hashCode
public int hashCode()- Overrides:
hashCodein classRegistryValue
-
toString
-