KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > directory > ldapstudio > browser > core > model > ldif > LdifEOFPart


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied. See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  *
19  */

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 JavaDoc toRawString()
56     {
57         return "";
58     }
59
60
61     public final String JavaDoc toFormattedString()
62     {
63         return "";
64     }
65
66
67     public final String JavaDoc toString()
68     {
69         String JavaDoc 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 JavaDoc 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