Class DWordValue
java.lang.Object
com.github.robtimus.os.windows.registry.RegistryValue
com.github.robtimus.os.windows.registry.SettableRegistryValue
com.github.robtimus.os.windows.registry.DWordValue
A representation of DWORD 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 TypeMethodDescriptionstatic DWordValuebigEndianOf(String name, int value) Creates a new big-endian DWORD registry value.booleaninthashCode()static DWordValuelittleEndianOf(String name, int value) Creates a new little-endian DWORD registry value.static DWordValueCreates a new DWORD registry value.toString()intvalue()Returns the registry value's DWORD value.Returns a registry value with the same name and value as this registry value but big-endian byte order.withBigEndianValue(int value) Returns a registry value with the same name as this registry value but a different big-endian value.Returns a registry value with the same name and value as this registry value but little-endian byte order.withLittleEndianValue(int value) Returns a registry value with the same name as this registry value but a different little-endian value.Returns a registry value with the same value as this registry value but a different name.withValue(int value) 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 DWORD registry value.- Parameters:
name- The name of the registry value.value- The registry value's DWORD value.- Returns:
- The created DWORD registry value.
- Throws:
NullPointerException- If the given name isnull.
-
littleEndianOf
Creates a new little-endian DWORD registry value. This is actually the same asof(String, int), but makes the byte order explicit.- Parameters:
name- The name of the registry value.value- The registry value's DWORD value.- Returns:
- The created DWORD registry value.
- Throws:
NullPointerException- If the given name isnull.
-
bigEndianOf
Creates a new big-endian DWORD registry value.- Parameters:
name- The name of the registry value.value- The registry value's DWORD value.- Returns:
- The created DWORD registry value.
- Throws:
NullPointerException- If the given name isnull.
-
value
public int value()Returns the registry value's DWORD value.- Returns:
- The registry value's DWORD value.
-
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 method does not change the byte order.- 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.
-
withLittleEndianValue
Returns a registry value with the same name as this registry value but a different little-endian value.- 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.
-
withBigEndianValue
Returns a registry value with the same name as this registry value but a different big-endian value.- 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.
-
withLittleEndianValue
Returns a registry value with the same name and value as this registry value but little-endian byte order.- Returns:
- A registry value with the same name and value as this registry value but little-endian byte order.
-
withBigEndianValue
Returns a registry value with the same name and value as this registry value but big-endian byte order.- Returns:
- A registry value with the same name and value as this registry value but big-endian byte order.
-
equals
- Overrides:
equalsin classRegistryValue
-
hashCode
public int hashCode()- Overrides:
hashCodein classRegistryValue
-
toString
-