утренние изменения

удаление эталона и роль студента
This commit is contained in:
2025-03-26 16:12:00 +03:00
parent 1ae4d1980a
commit 19afec4d25
62 changed files with 576 additions and 1098 deletions

View File

@@ -14,27 +14,22 @@
* limitations under the License.
*/
package com.github.difflib.patch;
import java.util.List;
/**
* This delta contains equal lines of data. Therefore nothing is to do in applyTo and restore.
*
* @author tobens
*/
public class EqualDelta<T> extends AbstractDelta<T> {
public EqualDelta(Chunk<T> source, Chunk<T> target) {
super(DeltaType.EQUAL, source, target);
}
@Override
protected void applyTo(List<T> target) throws PatchFailedException {
}
@Override
protected void restore(List<T> target) {
}
/**
* {@inheritDoc}
*/
@@ -42,13 +37,11 @@ public class EqualDelta<T> extends AbstractDelta<T> {
protected void applyFuzzyToAt(List<T> target, int fuzz, int delta) {
// equals so no operations
}
@Override
public String toString() {
return "[EqualDelta, position: " + getSource().getPosition() + ", lines: "
+ getSource().getLines() + "]";
}
@Override
public AbstractDelta<T> withChunks(Chunk<T> original, Chunk<T> revised) {
return new EqualDelta<T>(original, revised);