Package net.sf.gridarta.model.archetype
Class AbstractArchetypeBuilder<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.model.archetype.AbstractArchetypeBuilder<G,A,R>
-
- Direct Known Subclasses:
DefaultArchetypeBuilder,DefaultArchetypeBuilder,DefaultArchetypeBuilder
public abstract class AbstractArchetypeBuilder<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.Object
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractArchetypeBuilder(@NotNull GameObjectFactory<G,A,R> gameObjectFactory)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLast(G invObject)voidaddObjectText(@NotNull java.lang.String line)Rfinish()Finishes archetype construction.protected RgetArchetype()@NotNull java.lang.StringgetArchetypeName()voidinit(R prototype, @NotNull ErrorViewCollector errorViewCollector)voidreInit(@NotNull java.lang.String archetypeName)voidsetMsgText(@NotNull java.lang.String msgText)voidsetMultiX(int multiX)voidsetMultiY(int multiY)
-
-
-
Constructor Detail
-
AbstractArchetypeBuilder
protected AbstractArchetypeBuilder(@NotNull @NotNull GameObjectFactory<G,A,R> gameObjectFactory)Creates a new instance.- Parameters:
gameObjectFactory- the game object factory for creating the new archetype
-
-
Method Detail
-
init
public void init(@Nullable R prototype, @NotNull @NotNull ErrorViewCollector errorViewCollector)- Parameters:
prototype- the base archetype for artifacts;nullwhen parsing archetypeserrorViewCollector- all error and warning messages will be added to this error view collector
-
reInit
public void reInit(@NotNull @NotNull java.lang.String archetypeName)
-
setMsgText
public void setMsgText(@NotNull @NotNull java.lang.String msgText)
-
getArchetypeName
@NotNull public @NotNull java.lang.String getArchetypeName()
-
addObjectText
public void addObjectText(@NotNull @NotNull java.lang.String line)
-
addLast
public void addLast(@NotNull G invObject)
-
finish
@NotNull public R finish()
Finishes archetype construction.- Returns:
- the constructed archetype
-
setMultiX
public void setMultiX(int multiX)
-
setMultiY
public void setMultiY(int multiY)
-
getArchetype
@NotNull protected R getArchetype()
-
-