CalculatorFixableError(@Nullable String... messageCodes) { this.messageCodes = Collections.asList(messageCodes); }
protected AbstractMessage(@Nonnull String messageCode, @Nonnull MessageLevel messageType, @Nullable Object... parameters) { this(messageCode, messageType, Collections.asList(parameters)); }
MathType(@Nonnull Integer priority, boolean needMultiplicationSignBefore, boolean needMultiplicationSignAfter, @Nonnull MathGroupType groupType, @Nonnull List<String> tokens) { this.priority = priority; this.needMultiplicationSignBefore = needMultiplicationSignBefore; this.needMultiplicationSignAfter = needMultiplicationSignAfter; this.groupType = groupType; this.tokens = java.util.Collections.unmodifiableList(tokens); }
@Nonnull public static List<FunctionCategory> getCategoriesByTabOrder() { final List<FunctionCategory> result = Collections.asList(FunctionCategory.values()); java.util.Collections.sort(result, new Comparator<FunctionCategory>() { @Override public int compare(FunctionCategory category, FunctionCategory category1) { return category.tabOrder - category1.tabOrder; } }); return result; } }
@Nonnull public static List<VarCategory> getCategoriesByTabOrder() { final List<VarCategory> result = Collections.asList(VarCategory.values()); java.util.Collections.sort(result, new Comparator<VarCategory>() { @Override public int compare(VarCategory category, VarCategory category1) { return category.tabOrder - category1.tabOrder; } }); return result; } }
@Nullable public static <T extends Number> T min(T... numbers) { return min(Collections.asList(numbers)); }
@Nullable public static <T extends Number> T max(T... numbers) { return max(Collections.asList(numbers)); }
@Nonnull public static List<OperatorCategory> getCategoriesByTabOrder() { final List<OperatorCategory> result = Collections.asList(OperatorCategory.values()); java.util.Collections.sort(result, new Comparator<OperatorCategory>() { @Override public int compare(OperatorCategory category, OperatorCategory category1) { return category.tabOrder - category1.tabOrder; } }); // todo serso: current solution (as creating operators is not implemented yet) result.remove(my); return result; } }
@Nonnull private static List<MathType> getMathTypesByPriority() { if (mathTypesByPriority == null) { final List<MathType> result = Collections.asList(MathType.values()); java.util.Collections.sort(result, new Comparator<MathType>() { @Override public int compare(MathType l, MathType r) { return l.priority.compareTo(r.priority); } }); mathTypesByPriority = result; } return mathTypesByPriority; }