-
-
Notifications
You must be signed in to change notification settings - Fork 196
Provide a mechanism to create a new delta from an existing delta without caring about its type #75
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
Comments
I agree, that different implementations of Deltas could be useful. I will replace all instance checks with getType checks. |
So I replaced all I not happy with an |
@wumpz I think you misunderstood what I meant by |
@wumpz Great! Let me know when the SNAPSHOT is ready for testing. |
@wumpz I just noticed the SNAPSHOT has been updated. I tested this new feature and it works great. Thank you! Looking forward to an official (non-SNAPSHOT) release. |
The release Issue is already there (#78). |
Uh oh!
There was an error while loading. Please reload this page.
I am writing a method that needs to break a delta into pieces (e.g. two deltas that result in the same patch as the original delta). The current design is problematic because:
AbstractDelta
class is abstract, so I cannot simply invoke its constructor.AbstractDelta
subtypes do not providewith()
methods.DiffRowGenerator
) check the class type instance (e.g.if (delta instanceof InsertDelta)
instead of usingAbstractDelta.getType()
so I cannot subclassAbstractDelta
myself.Probably the easiest way to resolve this is to add an abstract
withChunks(Chunk<T> original, Chunk<T> revised)
method toAbstractDelta
.The text was updated successfully, but these errors were encountered: