1 19 20 package org.netbeans.modules.javacore.jmiimpl.javamodel; 21 22 29 public final class DiffElement { 30 31 private final int startOffset; 32 private final int endOffset; 33 private final String text; 34 35 43 public DiffElement(int startOffset, int endOffset, String text) { 44 this.startOffset = startOffset; 47 this.endOffset = endOffset; 48 this.text = text; 49 } 50 51 56 public int getStartOffset() { 57 return startOffset; 58 } 59 60 65 public int getEndOffset() { 66 return endOffset; 67 } 68 69 74 public String getText() { 75 return text; 76 } 77 78 84 public boolean isInserted() { 85 return startOffset == endOffset; 86 } 87 88 92 public boolean isDeleted() { 93 return startOffset < endOffset && text.length() == 0; 94 } 95 } 96 | Popular Tags |