Enum SortingData.SortDirection

    • Method Detail

      • values

        public static SortingData.SortDirection[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (SortingData.SortDirection c : SortingData.SortDirection.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SortingData.SortDirection valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • isAscending

        public boolean isAscending()
        Returns whether the direction is ascending.
        Returns:
        true if this SortingData.SortDirection corresponds to the ascending direction (i.e this.equals(SortDirection.ASC).
      • isDescending

        public boolean isDescending()
        Returns whether the direction is descending.
        Returns:
        true if this SortingData.SortDirection corresponds to the descending direction (i.e this.equals(SortDirection.DESC).
      • fromString

        public static SortingData.SortDirection fromString​(java.lang.String value)
        Returns the SortingData.SortDirection that corresponds to the given value.
        Parameters:
        value - The sort direction value (i.e "asc" or "desc")
        Returns:
        The SortingData.SortDirection that corresponds to the given value.
        Throws:
        java.lang.IllegalArgumentException - in case the given value cannot be parsed into an enum value.