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
-
public final class DWordValue extends SettableRegistryValue
A representation of DWORD registry values. Instances of this class are immutable.- Author:
- Rob Spoor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.github.robtimus.os.windows.registry.RegistryValue
RegistryValue.Filter
-
-
Field Summary
-
Fields inherited from class com.github.robtimus.os.windows.registry.RegistryValue
DEFAULT
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DWordValuebigEndianOf(String name, int value)Creates a new big-endian DWORD registry value.booleanequals(Object o)inthashCode()static DWordValuelittleEndianOf(String name, int value)Creates a new little-endian DWORD registry value.static DWordValueof(String name, int value)Creates a new DWORD registry value.StringtoString()intvalue()Returns the registry value's DWORD value.DWordValuewithBigEndianValue()Returns a registry value with the same name and value as this registry value but big-endian byte order.DWordValuewithBigEndianValue(int value)Returns a registry value with the same name as this registry value but a different big-endian value.DWordValuewithLittleEndianValue()Returns a registry value with the same name and value as this registry value but little-endian byte order.DWordValuewithLittleEndianValue(int value)Returns a registry value with the same name as this registry value but a different little-endian value.DWordValuewithName(String name)Returns a registry value with the same value as this registry value but a different name.DWordValuewithValue(int value)Returns a registry value with the same name as this registry value but a different value.-
Methods inherited from class com.github.robtimus.os.windows.registry.RegistryValue
filter, name
-
-
-
-
Method Detail
-
of
public static DWordValue of(String name, int value)
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
public static DWordValue littleEndianOf(String name, int value)
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
public static DWordValue bigEndianOf(String name, int value)
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
public DWordValue withName(String name)
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
public DWordValue withValue(int value)
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
public DWordValue withLittleEndianValue(int value)
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
public DWordValue withBigEndianValue(int value)
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
public DWordValue 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
public DWordValue 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
public boolean equals(Object o)
- Overrides:
equalsin classRegistryValue
-
hashCode
public int hashCode()
- Overrides:
hashCodein classRegistryValue
-
-