directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r420122 - /directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/util/Position.java
Date Sat, 08 Jul 2006 15:28:41 GMT
Author: elecharny
Date: Sat Jul  8 08:28:41 2006
New Revision: 420122

URL: http://svn.apache.org/viewvc?rev=420122&view=rev
Log:
Added this helper class. It's used by the StringTools methods and by 
the LdapDN parser to keep a track of the current position.

Added:
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/util/Position.java

Added: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/util/Position.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/util/Position.java?rev=420122&view=auto
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/util/Position.java
(added)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/util/Position.java
Sat Jul  8 08:28:41 2006
@@ -0,0 +1,37 @@
+/*
+ *   Copyright 2005 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.directory.shared.ldap.util;
+
+/**
+ *
+ * This class is used to store the position of a token in a string. It's very
+ * usefull while parsing a DN. 
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ *
+ */
+public class Position
+{
+    public int start = 0;
+    public int length =0;
+    public int end = 0;
+    
+    public String toString()
+    {
+        return "[" + start + ", " + end + ", " + length + "]";
+    }
+}



Mime
View raw message