1 20 21 package org.apache.directory.ldapstudio.browser.core.model.ldif; 22 23 24 public final class LdifEOFPart implements LdifPart 25 { 26 27 private static final long serialVersionUID = -8527682569842893613L; 28 29 private int offset; 30 31 32 protected LdifEOFPart() 33 { 34 } 35 36 37 public LdifEOFPart( int offset ) 38 { 39 this.offset = offset; 40 } 41 42 43 public final int getOffset() 44 { 45 return this.offset; 46 } 47 48 49 public final int getLength() 50 { 51 return 0; 52 } 53 54 55 public final String toRawString() 56 { 57 return ""; 58 } 59 60 61 public final String toFormattedString() 62 { 63 return ""; 64 } 65 66 67 public final String toString() 68 { 69 String text = toRawString(); 70 text = text.replaceAll( "\n", "\\\\n" ); 71 text = text.replaceAll( "\r", "\\\\r" ); 72 return getClass().getName() + " (" + getOffset() + "," + getLength() + "): '" + text + "'"; 73 } 74 75 76 public final boolean isValid() 77 { 78 return true; 79 } 80 81 82 public final String getInvalidString() 83 { 84 return ""; 85 } 86 87 88 public final void adjustOffset( int adjust ) 89 { 90 this.offset += adjust; 91 } 92 93 } 94 | Popular Tags |