public class PropertyBuilder extends Object implements Writable
Constructor and Description |
---|
PropertyBuilder()
Creates a 0 length property array
|
PropertyBuilder(int size)
Creates a property array with the specified size
|
Modifier and Type | Method and Description |
---|---|
PropertyBuilder |
addModifier(int index,
String modifier)
Puts an attribute property at the given index
|
PropertyBuilder |
cleanup()
Removes all null elements in the property array
|
String |
key()
The key of the property
|
String[] |
modifiers()
Gets the property array wrapped by the builder
|
PropertyBuilder |
setKey(String key)
Sets the key of the property builder
|
PropertyBuilder |
setValue(double value)
Sets the value of the property builder
|
double |
value()
Gets the value of the property builder
|
void |
write(ByteBuf buf)
Writes the data contained by the current implementation into serialized form in the provided
io.netty.buffer.ByteBuf |
public PropertyBuilder()
public PropertyBuilder(int size)
size
- the size of the property arraypublic PropertyBuilder setKey(String key)
key
- the key to setpublic double value()
public PropertyBuilder setValue(double value)
value
- the value to setpublic String[] modifiers()
public PropertyBuilder addModifier(int index, String modifier)
index
- the index to place the property atmodifier
- the property to placepublic PropertyBuilder cleanup()
Copyright © 2016. All rights reserved.