Betty v1.1.0

christophedelory.betty.xml
Class Child

java.lang.Object
  extended by christophedelory.betty.xml.Child
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AbstractMetadataDetails, ChampionshipsDetails, IdDetails, LocationsDetails, PlayersDetails, ResourcesDetails, UsersDetails

public class Child
extends Object
implements Serializable

The definition of a parent's child.

Version:
$Revision$
Author:
Christophe Delory
See Also:
Serialized Form

Constructor Summary
Child()
           
 
Method Summary
 Child getParent()
          Returns the parent of this child, if any.
 Child getRoot()
          Returns the root in this element's hierarchy.
 Child getRoot(Class<? extends Child> clazz)
          Returns the root in this element's hierarchy of the specified class.
 Version getVersion()
          Returns the associated version information, if any.
 void setParent(Child parent)
          Initializes the parent of this child.
 void setVersion(Version version)
          Initializes the associated version information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Child

public Child()
Method Detail

setParent

public void setParent(Child parent)
Initializes the parent of this child.

Parameters:
parent - the new child's parent. May be null.
See Also:
getParent()

getParent

public Child getParent()
Returns the parent of this child, if any.

Returns:
the child's parent. May be null.
See Also:
setParent(Child), getRoot()

getRoot

public Child getRoot()
Returns the root in this element's hierarchy.

Returns:
the root element. May refer to this element. Shall not be null.
Since:
1.0.0
See Also:
getParent(), getRoot(Class)

getRoot

public Child getRoot(Class<? extends Child> clazz)
Returns the root in this element's hierarchy of the specified class.

Parameters:
clazz - a class. Shall not be null.
Returns:
the root element. May refer to this element. May be null.
Throws:
NullPointerException - if clazz is null.
Since:
1.0.0
See Also:
getRoot()

getVersion

public Version getVersion()
Returns the associated version information, if any.

Returns:
a version information. May be null.
See Also:
setVersion(Version)

setVersion

public void setVersion(Version version)
Initializes the associated version information.

Parameters:
version - a version information. May be null.
See Also:
getVersion()

© 2008-2009 Christophe Delory

Copyright © 2008-2009 Christophe Delory. All Rights Reserved.