org.jboss.cache
Class Fqn

java.lang.Object
  extended byorg.jboss.cache.Fqn
All Implemented Interfaces:
Cloneable, Externalizable, Serializable

public class Fqn
extends Object
implements Cloneable, Externalizable

Fully qualified name. Essentially a list of relative names, from root to a given node. This class is immutable.

Version:
$Revision: 1.6.2.6 $
See Also:
Serialized Form

Constructor Summary
Fqn()
           
Fqn(Fqn base, Fqn relative)
           
Fqn(Fqn base, Object relative_name)
           
Fqn(List names)
           
Fqn(Object name)
           
Fqn(Object[] names)
           
 
Method Summary
 Fqn add(List names)
           
 void addFqn(String fqn)
          Constructs an Fqn out of a string such as "/a/b/c"
 Object clone()
           
 boolean equals(Object obj)
           
static Fqn fromString(String fqn)
           
 Object get(int index)
           
 Fqn getFqnChild(int index)
          Obtain a child Fqn from a sub-index.
 int hashCode()
           
 boolean isChildOf(Fqn parentFqn)
          Check if current fqn is child of parentFqn
 void readExternal(ObjectInput in)
           
 int size()
           
 String toString()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Fqn

public Fqn()

Fqn

public Fqn(Object name)

Fqn

public Fqn(List names)

Fqn

public Fqn(Object[] names)

Fqn

public Fqn(Fqn base,
           Object relative_name)

Fqn

public Fqn(Fqn base,
           Fqn relative)
Method Detail

fromString

public static Fqn fromString(String fqn)

getFqnChild

public Fqn getFqnChild(int index)
Obtain a child Fqn from a sub-index.

Parameters:
index - where is the last index of child fqn
Returns:
A Fqn child object.

addFqn

public void addFqn(String fqn)
Constructs an Fqn out of a string such as "/a/b/c"

Parameters:
fqn -

add

public Fqn add(List names)

size

public int size()

get

public Object get(int index)

clone

public Object clone()

equals

public boolean equals(Object obj)

hashCode

public int hashCode()

toString

public String toString()

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

isChildOf

public boolean isChildOf(Fqn parentFqn)
Check if current fqn is child of parentFqn

Parameters:
parentFqn -
Returns:


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.