Class ArcheTextRoot
java.lang.Object
com.blackrook.archetext.ArcheTextRoot
The root of an ArcheText Hierarchy.
This is an object that contains other objects.
- Author:
- Matthew Tropiano
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(ArcheTextObject object) Adds an object.<T> T[]exportByType(String type, Class<T> outputType) Returns all ArcheTextObjects of a particular type exported as POJOs.Gets a default object by type.Gets an object by type and name.getAllByType(String type) Returns all ArcheTextObjects of a particular type.String[]getTypes()booleanremove(ArcheTextObject object) Removes an ArcheText object from this root.
-
Constructor Details
-
ArcheTextRoot
public ArcheTextRoot()Creates a new root.
-
-
Method Details
-
get
Gets a default object by type.- Parameters:
type- object type.- Returns:
- the corresponding object, or null if no default.
-
get
Gets an object by type and name. Empty name is default.- Parameters:
type- object type.name- object name.- Returns:
- the corresponding object, or null if not found.
-
getTypes
- Returns:
- all types that this root contains.
-
getAllByType
Returns all ArcheTextObjects of a particular type.- Parameters:
type- the type name.- Returns:
- all of the relevant objects found as an array. Never null.
-
exportByType
Returns all ArcheTextObjects of a particular type exported as POJOs.- Type Parameters:
T- the return type.- Parameters:
type- the type name.outputType- the output class type.- Returns:
- all of the relevant objects found as an array. Never null.
-
add
-
remove
Removes an ArcheText object from this root.- Parameters:
object- the object to remove.- Returns:
- true if removed, false if not.
-