Class DWordValue


  • public final class DWordValue
    extends SettableRegistryValue
    A representation of DWORD registry values. Instances of this class are immutable.
    Author:
    Rob Spoor
    • 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 is null.
      • littleEndianOf

        public static DWordValue littleEndianOf​(String name,
                                                int value)
        Creates a new little-endian DWORD registry value. This is actually the same as of(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 is null.
      • 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 is null.
      • 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: SettableRegistryValue
        Returns a registry value with the same value as this registry value but a different name.
        Specified by:
        withName in class SettableRegistryValue
        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.