Class Resources


  • @Beta
    public final class Resources
    extends Object
    Utility class for resource related classes.
    • Method Detail

      • discrete

        public static DiscreteFactory discrete​(DeviceId device)
        Create a factory for discrete-type with the specified device ID.
        Parameters:
        device - device ID
        Returns:
        DiscreteFactory
      • discrete

        public static DiscreteFactory discrete​(DeviceId device,
                                               Object... components)
        Create a factory for discrete-type with the specified device ID and components.
        Parameters:
        device - device ID
        components - resource ID components other than the device ID
        Returns:
        DiscreteFactory
      • discrete

        public static DiscreteFactory discrete​(DeviceId device,
                                               PortNumber port,
                                               Object... components)
        Create a factory for discrete-type with the specified device ID, port number and components.
        Parameters:
        device - device ID
        port - port number
        components - resource ID components other than the device ID and port number
        Returns:
        DiscreteFactory
      • continuous

        public static ContinuousFactory continuous​(DeviceId device,
                                                   Class<?> cls)
        Create a factory for continuous-type with the specified device ID and type.
        Parameters:
        device - device ID
        cls - type of resource the returned factory will create
        Returns:
        ContinuousFactory
      • continuous

        public static ContinuousFactory continuous​(DeviceId device,
                                                   Object... components)
        Create a factory for continuous-type with the specified device ID and components. The last element of the components must be a Class instance. Otherwise, an IllegalArgumentException is thrown.
        Parameters:
        device - device ID
        components - resource ID components other than the device ID.
        Returns:
        ContinuousFactory
      • continuous

        public static ContinuousFactory continuous​(DeviceId device,
                                                   PortNumber port,
                                                   Class<?> cls)
        Create a factory for continuous-type with the specified device ID, port number and type.
        Parameters:
        device - device ID
        port - port number
        cls - type of resource the returned factory will create
        Returns:
        ContinuousFactory
      • continuous

        public static ContinuousFactory continuous​(DeviceId device,
                                                   PortNumber port,
                                                   Object... components)
        Create a factory for continuous-type with the specified device ID and components. The last element of the components must be a Class instance. Otherwise, an IllegalArgumentException is thrown.
        Parameters:
        device - device ID
        port - port number
        components - resource ID components other than the device ID and port number.
        Returns:
        ContinuousFactory