/** * Creates a new top level {@link Category} with the given sorting priority. * * @param parent the name of a parent category, or null * @param name the name of the category * @param explanation an optional explanation of the category * @param priority a sorting priority, with higher being more important * @return a new category */ public static Category create(Category parent, String name, String explanation, int priority) { return new Category(parent, name, null, priority); }
/** * Creates a new top level {@link Category} with the given sorting priority. * * @param name the name of the category * @param priority a sorting priority, with higher being more important * @return a new category */ public static Category create(String name, int priority) { return new Category(null, name, null, priority); }
/** * Creates a new top level {@link Category} with the given sorting priority. * * @param name the name of the category * @param priority a sorting priority, with higher being more important * @return a new category */ @NonNull public static Category create(@NonNull String name, int priority) { return new Category(null, name, priority); }
/** * Creates a new top level {@link Category} with the given sorting priority. * * @param parent the name of a parent category, or null * @param name the name of the category * @param priority a sorting priority, with higher being more important * @return a new category */ @NonNull public static Category create(@Nullable Category parent, @NonNull String name, int priority) { return new Category(parent, name, priority); }