Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Provide a mechanism to create a new delta from an existing delta without caring about its type #75

Closed
@cowwoc

Description

@cowwoc

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:

  1. I don't want my method to know/care what the delta type is.
  2. TheAbstractDelta class is abstract, so I cannot simply invoke its constructor.
  3. TheAbstractDelta subtypes do not providewith() methods.
  4. Some of your code (e.g.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 abstractwithChunks(Chunk<T> original, Chunk<T> revised) method toAbstractDelta.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp