Interface Type

  • All Superinterfaces:
    Key
    All Known Implementing Classes:
    ChartType, ControllerType

    public interface Type
    extends Key
    Interface to map the type and scale type of a chart.
    Author:
    Andrea "Stock" Stocchero
    • Method Detail

      • isValid

        static boolean isValid​(Type type)
        Returns true if type passed as argument is not null and its scale type is not null as well.
        Parameters:
        type - type to be checked
        Returns:
        true if type passed as argument is not null and its scale type is not null as well.
      • checkIfValid

        static void checkIfValid​(Type type)
        Checks if type passed as argument is not null and its scale type is not null as well.
        If not, throw a IllegalArgumentException.
        Parameters:
        type - type to be checked
      • checkAndGetIfValid

        static <T extends Type> T checkAndGetIfValid​(T type)
        Checks if type passed as argument is not null and its scale type is not null as well.
        If not, throw a IllegalArgumentException, otherwise it returns the key.
        Type Parameters:
        T - type of chart type
        Parameters:
        type - type to be checked
        Returns:
        the same key passed as argument
      • scaleType

        ScaleType scaleType()
        Returns the scale type of the chart.
        Returns:
        the scale type of the chart.