public static class ShortProperty.Factory extends Object implements PropertyFactory<ShortProperty>
Constructor and Description |
---|
ShortProperty.Factory(Attributes attrs) |
ShortProperty.Factory(short defaultValue) |
Modifier and Type | Method and Description |
---|---|
void |
clone(ShortProperty src,
int srcIndex,
ShortProperty dst,
int dstIndex)
Copy the value from src at component index, srcIndex to
dst at dstIndex.
|
ShortProperty |
create()
Return a new Property instance.
|
void |
setDefaultValue(ShortProperty property,
int index)
Set the default value that the component at the specified index will see
before it's init() method is invoked.
|
public ShortProperty.Factory(Attributes attrs)
public ShortProperty.Factory(short defaultValue)
public ShortProperty create()
PropertyFactory
create
in interface PropertyFactory<ShortProperty>
public void setDefaultValue(ShortProperty property, int index)
PropertyFactory
setDefaultValue
in interface PropertyFactory<ShortProperty>
property
- The property whose value will be updatedindex
- The component index to be updatedpublic void clone(ShortProperty src, int srcIndex, ShortProperty dst, int dstIndex)
PropertyFactory
Entity.add(com.lhkbob.entreri.Component)
.
For many cases a plain copy-by-value or copy-by-reference is sufficient, but some
component types might require more complicated cloning rules.clone
in interface PropertyFactory<ShortProperty>
src
- The source property that is being clonedsrcIndex
- The index into src of the component being cloneddst
- The destination property created from the templatedstIndex
- The index into dst of the component being createdCopyright © 2013. All Rights Reserved.