Class CalendarHierarchy

java.lang.Object
de.focus_shift.jollyday.core.CalendarHierarchy

public class CalendarHierarchy extends Object
Bean class for describing the configuration hierarchy.
  • Constructor Details

    • CalendarHierarchy

      public CalendarHierarchy(@Nullable CalendarHierarchy parent, @NonNull String id)
      Constructor which takes a eventually existing parent hierarchy node and the ID of this hierarchy.
      Parameters:
      parent - a CalendarHierarchy object.
      id - a String object.
  • Method Details

    • getId

      public @NonNull String getId()

      Getter for the field id.

      Returns:
      the id
    • getDescription

      public @NonNull String getDescription()
      Returns the country description for the default locale.
      Returns:
      the description
    • getDescription

      public @NonNull String getDescription(Locale locale)
      Returns the hierarchies description text from the resource bundle.
      Parameters:
      locale - Locale to return the description text for.
      Returns:
      Description text
    • equals

      public boolean equals(Object obj)

      Compares Hierarchies by id.

      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • setChildren

      public void setChildren(Map<String,CalendarHierarchy> children)

      Setter for the field children.

      Parameters:
      children - the children to set
    • getChildren

      public @NonNull Map<String,CalendarHierarchy> getChildren()

      Getter for the field children.

      Returns:
      the children
    • setFallbackDescription

      public void setFallbackDescription(String description)
      Parameters:
      description - the fallback description