B - the builder recursive typepublic class WaveBuilder<B extends WaveBuilder<B>> extends Object implements Builder<WaveBase>
| Modifier and Type | Field and Description |
|---|---|
private long |
bitMask
The field used to store the property mask (allow up to 64 properties).
|
private Class<?> |
fromClass
The from class of the wave to build.
|
private Class<?> |
relatedClass
The related class of the wave to build.
|
private Class<? extends WaveBean> |
waveBeanClass
The wave bean class of the wave to build.
|
private WaveData<?>[] |
waveData
The list of Wave Data.
|
private WaveGroup |
waveGroup
The wave group of the wave to build.
|
private WaveType |
waveType
The wave type of the wave to build.
|
| Constructor and Description |
|---|
WaveBuilder() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addBit(int bit)
Add a bit to the mask.
|
void |
applyTo(WaveBase paramWave)
Apply all wave properties.
|
WaveBase |
build() |
static WaveBuilder<?> |
create()
Create a WaveBuilder instance.
|
B |
data(WaveData<?>... waveData)
Define the list of WaveData.
|
B |
fromClass(Class<?> fromClass)
Define the from class.
|
protected boolean |
hasBit(int bit)
Check if the mask contains the requested bit.
|
B |
relatedClass(Class<?> relatedClass)
Define the related class.
|
B |
waveBeanClass(Class<? extends WaveBean> waveBeanClass)
Define the wave bean class.
|
B |
waveGroup(WaveGroup waveGroup)
Define the wave group.
|
B |
waveType(WaveType waveType)
Define the wave type.
|
private long bitMask
private WaveGroup waveGroup
private WaveType waveType
private Class<?> fromClass
private Class<?> relatedClass
private Class<? extends WaveBean> waveBeanClass
private WaveData<?>[] waveData
public static WaveBuilder<?> create()
public void applyTo(WaveBase paramWave)
paramWave - the wave that need to be initialized with builder valuespublic B waveGroup(WaveGroup waveGroup)
waveGroup - the wave group to setpublic B waveType(WaveType waveType)
waveType - the wave type to setpublic B fromClass(Class<?> fromClass)
fromClass - the from class to setpublic B relatedClass(Class<?> relatedClass)
relatedClass - the related class to setpublic B waveBeanClass(Class<? extends WaveBean> waveBeanClass)
waveBeanClass - the wave bean class to setpublic B data(WaveData<?>... waveData)
waveData - the list of waveData to setprotected void addBit(int bit)
bit - the bit to addprotected boolean hasBit(int bit)
bit - the requested bitCopyright © 2011–2014 JRebirth OSS. All rights reserved.