Class Resources


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

      • discrete

        public static DiscreteFactory discrete​(DiscreteResourceId parent,
                                               java.lang.Object child)
        Creates a factory for discrete-type with the specified parent ID and child.
        Parameters:
        parent - ID of the parent
        child - child
        Returns:
        DiscreteFactory
      • 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,
                                               java.lang.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,
                                               java.lang.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,
                                                   java.lang.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,
                                                   java.lang.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,
                                                   java.lang.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,
                                                   java.lang.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