Top Description Constructors Methods
org.glassfish.jaxb.runtime.v2.schemagen

public final Class Util

extends Object
Class Inheritance

Todo

JAX-WS dependes on this class - consider moving it somewhere more stable, Notify JAX-WS before modifying anything... Other miscellaneous utility methods.

Author
Kohsuke Kawaguchi ([email protected])

Constructor Summary

AccessConstructor and Description
private
Util()

Method Summary

Modifier and TypeMethod and Description
public static boolean

Returns:

true iff the strings are equal, false if they aren't equal or either of them are null.
equal
(String
string 1
s
,
String
string 2
t
)

determine if two Strings are iqual allowing null values

public static boolean

Returns:

true iff the given strings are equal ignoring case, false if they aren't equal or either of them are null.
equalsIgnoreCase
(String
string 1
s
,
String
string 2
t
)

determine if two Strings are equal ignoring case allowing null values

public static String
escapeURI(String
source string to be escaped
s
)

Escape any characters that would cause the single arg constructor of java.net.URI to complain about illegal chars.

public static String

Returns:

the parent URI path of the given URI path
getParentUriPath
(String
the uriPath (as returned by java.net.URI#getPath()
uriPath
)

Calculate the parent URI path of the given URI path.

public static String

Returns:

the normalized uri path
normalizeUriPath
(String
path of a URI (as returned by java.net.URI#getPath()
uriPath
)

Calculate the normalized form of the given uriPath.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Utilback to summary
private Util()

Method Detail

equalback to summary
public static boolean equal(String s, String t)

determine if two Strings are iqual allowing null values

Parameters
s:String

string 1

t:String

string 2

Returns:boolean

true iff the strings are equal, false if they aren't equal or either of them are null.

equalsIgnoreCaseback to summary
public static boolean equalsIgnoreCase(String s, String t)

determine if two Strings are equal ignoring case allowing null values

Parameters
s:String

string 1

t:String

string 2

Returns:boolean

true iff the given strings are equal ignoring case, false if they aren't equal or either of them are null.

escapeURIback to summary
public static String escapeURI(String s)

Escape any characters that would cause the single arg constructor of java.net.URI to complain about illegal chars.

Parameters
s:String

source string to be escaped

getParentUriPathback to summary
public static String getParentUriPath(String uriPath)

Calculate the parent URI path of the given URI path.

Parameters
uriPath:String

the uriPath (as returned by java.net.URI#getPath()

Returns:String

the parent URI path of the given URI path

normalizeUriPathback to summary
public static String normalizeUriPath(String uriPath)

Calculate the normalized form of the given uriPath.

For example:

/a/b/c/ -> /a/b/c/
   /a/b/c  -> /a/b/
   /a/     -> /a/
   /a      -> /
   
Parameters
uriPath:String

path of a URI (as returned by java.net.URI#getPath()

Returns:String

the normalized uri path