Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making deletePatternRule a public method. #80

Merged
merged 3 commits into from
Mar 28, 2023
Merged

Conversation

baldawar
Copy link
Collaborator

We already have addPatternRule as public but offer no equivalent for deleting patterns. The method is tested as part of our MachineTests.java so assuming we missed making this public in past (probably because nobody asked until #64).

Benchmarks were not necessary for this change.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

We already have `addPatternRule` as public but offer no equivivalent
for deleting patterns. The method is tested as part of our
MachineTests.java so assuming we missed making this public in past
(probably because nobody asked until #64).

Benchmarks were not necessary for this change.
@@ -593,10 +593,11 @@ public static Range between(final double bottom, final boolean openBottom, final
```

Once you have constructed appropriate `Patterns` matchers with these methods, you can use the
following form of `Machine.addRule()` to add them to your machine:
following methods to add to or delete from your machine:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a line saying that the cautions expressed in the description of deleteRule apply here, i.e. the patterns in the deletePatternRule call aren't required to match those in the corresponding add.

based on feedback on the pull-request.
@baldawar baldawar merged commit 4b4b6f4 into main Mar 28, 2023
@baldawar baldawar deleted the deletePatternRule branch March 28, 2023 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants