Skip navigation links

Oracle Virtual Directory Java API Reference
11g Release 1 (11.1.1)

E10688-03


com.octetstring.vde.syntax
Class DirectoryString

java.lang.Object
  extended by com.octetstring.vde.syntax.Syntax
      extended by com.octetstring.vde.syntax.DirectoryString

All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DirectoryString>
Direct Known Subclasses:
DistinguishedName

public class DirectoryString
extends Syntax
implements java.io.Serializable, java.lang.Comparable<DirectoryString>

Class representing a Directory String syntax (case insensitive string)

Author:
Octet String, Inc.
See Also:
Serialized Form

Constructor Summary
DirectoryString()
          Create an empty directory string.
DirectoryString(byte[] bytes)
          Create a directory string from the given byte array.
DirectoryString(byte[] bytes, int hashCode)
          Create a directory string from the given byte array, but skip the computation of the hashCode.
DirectoryString(java.lang.String data)
          Create a new directory string from the given String.

 

Method Summary
 java.lang.Object clone()
           
 int compareTo(DirectoryString ds)
          Compare this directory string to another.
 int compareTo(Syntax val)
          Compare this directory string to another.
 boolean endsWith(DirectoryString endsString)
          Determine if this directory string ends with the one passed as an argument.
 boolean endsWith(Syntax val)
          Determine if this directory string ends with the one passed as an argument.
 boolean equals(DirectoryString dirString)
          Determine if this directory string equals another.
 boolean equals(java.lang.Object obj)
          Determine if this directory string equals another.
 byte[] getBytes()
          Get this directory string as a byte array.
 byte[] getDirectoryBytes()
          Get this directory string as an array of bytes.
 char[] getDirectoryChars()
           
 java.lang.String getDirectoryString()
          Get a String representation of this directory string.
 byte[] getValue()
          Get this directory string as a byte array.
 int hashCode()
          Get the hashCode value of this directory string.
 int indexOf(DirectoryString indexString)
          Find the first occurance of the index string in this directory string.
 int indexOf(Syntax val)
          Find the first occurance of the index string in this directory string.
 int length()
          Get the length of this directory string.
 java.lang.String normalize()
          Return an upper case, UTF8 normalized version of this string.
 Syntax reverse()
          Returns a new directory string that is the reverse of this one.
 void setDirectoryBytes(byte[] directoryBytes)
          Set this directory string to an array of bytes.
 void setDirectoryString(java.lang.String directoryString)
          Sets the value of this directory string using another.
 void setValue(byte[] value)
          Sets the value of this directory string from an array of bytes
 void setValue(byte[] value, int hashCode)
          Sets the value of this directory string from an array of bytes and bypasses hashcode computation by accepting one as a parameter.
 boolean startsWith(DirectoryString startString)
          Determines if the specified directory string is at the beginning of this directory string.
 boolean startsWith(Syntax val)
          Determines if the specified value is at the start of this string.
 DirectoryString substring(int first, int last)
           
 java.lang.String toString()
          Describe toString method here.
 void validate()
          Determines if this value is in accordance to the syntax rules (if any)

 

Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait

 

Constructor Detail

DirectoryString

public DirectoryString()
Create an empty directory string.

DirectoryString

public DirectoryString(byte[] bytes)
Create a directory string from the given byte array.
Parameters:
bytes - a byte[] value

DirectoryString

public DirectoryString(byte[] bytes,
                       int hashCode)
Create a directory string from the given byte array, but skip the computation of the hashCode.
Parameters:
bytes - a byte[] value
hashCode - an int value

DirectoryString

public DirectoryString(java.lang.String data)
Create a new directory string from the given String.
Parameters:
data - a String value

Method Detail

getDirectoryBytes

public byte[] getDirectoryBytes()
Get this directory string as an array of bytes.
Returns:
a byte[] value

setDirectoryBytes

public void setDirectoryBytes(byte[] directoryBytes)
Set this directory string to an array of bytes.
Parameters:
directoryBytes - a byte[] value

compareTo

public int compareTo(DirectoryString ds)
Compare this directory string to another.
Specified by:
compareTo in interface java.lang.Comparable<DirectoryString>
Parameters:
ds - a DirectoryString value
Returns:
an int value

compareTo

public int compareTo(Syntax val)
Compare this directory string to another.
Specified by:
compareTo in class Syntax
Parameters:
val - a Syntax value
Returns:
an int value

endsWith

public boolean endsWith(DirectoryString endsString)
Determine if this directory string ends with the one passed as an argument.

endsWith

public boolean endsWith(Syntax val)
Determine if this directory string ends with the one passed as an argument.
Specified by:
endsWith in class Syntax
Parameters:
val - a Syntax value
Returns:
a boolean value

equals

public boolean equals(DirectoryString dirString)
Determine if this directory string equals another.
Parameters:
dirString - a DirectoryString value
Returns:
a boolean value

equals

public boolean equals(java.lang.Object obj)
Determine if this directory string equals another.
Overrides:
equals in class java.lang.Object
Parameters:
obj - an Object value
Returns:
a boolean value

getBytes

public byte[] getBytes()
Get this directory string as a byte array.
Returns:
a byte[] value

getDirectoryString

public java.lang.String getDirectoryString()
Get a String representation of this directory string.
Returns:
a String value

getValue

public byte[] getValue()
Get this directory string as a byte array.
Specified by:
getValue in class Syntax
Returns:
a byte[] value

hashCode

public int hashCode()
Get the hashCode value of this directory string.
Overrides:
hashCode in class java.lang.Object
Returns:
an int value

indexOf

public int indexOf(DirectoryString indexString)
Find the first occurance of the index string in this directory string.
Parameters:
indexString - a DirectoryString value
Returns:
an int value

indexOf

public int indexOf(Syntax val)
Find the first occurance of the index string in this directory string.
Specified by:
indexOf in class Syntax
Parameters:
val - a Syntax value
Returns:
an int value

length

public int length()
Get the length of this directory string.
Returns:
an int value

normalize

public java.lang.String normalize()
Return an upper case, UTF8 normalized version of this string.
Specified by:
normalize in class Syntax
Returns:
a String value

reverse

public Syntax reverse()
Returns a new directory string that is the reverse of this one.
Specified by:
reverse in class Syntax
Returns:
a Syntax value

setDirectoryString

public void setDirectoryString(java.lang.String directoryString)
Sets the value of this directory string using another.
Parameters:
directoryString - a String value

setValue

public void setValue(byte[] value)
Sets the value of this directory string from an array of bytes
Specified by:
setValue in class Syntax
Parameters:
value - a byte[] value

setValue

public void setValue(byte[] value,
                     int hashCode)
Sets the value of this directory string from an array of bytes and bypasses hashcode computation by accepting one as a parameter.
Specified by:
setValue in class Syntax
Parameters:
value - a byte[] value
hashCode - an int value

startsWith

public boolean startsWith(DirectoryString startString)
Determines if the specified directory string is at the beginning of this directory string.
Parameters:
startString - a DirectoryString value
Returns:
a boolean value

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

substring

public DirectoryString substring(int first,
                                 int last)

startsWith

public boolean startsWith(Syntax val)
Determines if the specified value is at the start of this string.
Specified by:
startsWith in class Syntax
Parameters:
val - a Syntax value
Returns:
a boolean value

toString

public java.lang.String toString()
Describe toString method here.
Overrides:
toString in class java.lang.Object
Returns:
a String value

getDirectoryChars

public char[] getDirectoryChars()

validate

public void validate()
              throws com.octetstring.vde.syntax.InvalidSyntaxException
Description copied from class: Syntax
Determines if this value is in accordance to the syntax rules (if any)
Specified by:
validate in class Syntax
Throws:
com.octetstring.vde.syntax.InvalidSyntaxException

Skip navigation links

Oracle Virtual Directory Java API Reference
11g Release 1 (11.1.1)

E10688-03


Copyright © 2000-2010 Oracle and/or its affiliates. All Rights Reserved.