Skip to content

Unprivate Arithmetics#exactOperationExists method #7206

@Fusezion

Description

@Fusezion

Suggestion

Unprivate the exactOperationExists method on the Arithmetics class

Why?

Currently addons have no real way of checking if operations for arithmetic are currently registered making usage of the register unsafe

Other

Step to fix

private static boolean exactOperationExists(Operator operator, Class<?> leftClass, Class<?> rightClass) {
for (OperationInfo<?, ?, ?> info : getOperations_i(operator)) {
if (info.getLeft() == leftClass && info.getRight() == rightClass)
return true;
}
return false;
}

- private static boolean exactOperationExists(Operator operator, Class<?> leftClass, Class<?> rightClass) {
+ public static boolean exactOperationExists(Operator operator, Class<?> leftClass, Class<?> rightClass) {

Agreement

  • I have read the guidelines above and affirm I am following them with this suggestion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    PR availableIssues which have a yet-to-be merged PR resolving itenhancementFeature request, an issue about something that could be improved, or a PR improving something.priority: lowest"Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions