@Immutable public class MqttUserPropertiesImpl extends java.lang.Object implements Mqtt5UserProperties
Mqtt5UserProperties
Modifier and Type | Field and Description |
---|---|
static @NotNull MqttUserPropertiesImpl |
NO_USER_PROPERTIES
Empty collection of User Properties.
|
Modifier and Type | Method and Description |
---|---|
@NotNull ImmutableList<MqttUserPropertyImpl> |
asList() |
static @NotNull MqttUserPropertiesImpl |
build(ImmutableList.Builder<MqttUserPropertyImpl> userPropertiesBuilder)
Builds a collection of User Properties from the given builder.
|
void |
encode(@NotNull io.netty.buffer.ByteBuf out)
Encodes this collection of User Properties to the given byte buffer at the current writer index.
|
int |
encodedLength()
Calculates the byte count of this collection of User Properties according to the MQTT 5 specification.
|
boolean |
equals(@Nullable java.lang.Object o) |
MqttUserPropertiesImplBuilder.Default |
extend() |
int |
hashCode() |
static @NotNull MqttUserPropertiesImpl |
of(@NotNull ImmutableList<MqttUserPropertyImpl> userProperties)
Creates a collection of User Properties from the given immutable list of User Properties.
|
@NotNull java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
builder, of, of, of
@NotNull public static final @NotNull MqttUserPropertiesImpl NO_USER_PROPERTIES
@NotNull public static @NotNull MqttUserPropertiesImpl of(@NotNull @NotNull ImmutableList<MqttUserPropertyImpl> userProperties)
userProperties
- the immutable list of User Properties.NO_USER_PROPERTIES
if the list is empty.@NotNull public static @NotNull MqttUserPropertiesImpl build(@Nullable ImmutableList.Builder<MqttUserPropertyImpl> userPropertiesBuilder)
userPropertiesBuilder
- the builder for the User Properties.NO_USER_PROPERTIES
if the builder is null.@NotNull public @NotNull ImmutableList<MqttUserPropertyImpl> asList()
asList
in interface Mqtt5UserProperties
public void encode(@NotNull @NotNull io.netty.buffer.ByteBuf out)
This method does not check if name and value can not be encoded due to byte count restrictions. This check is
performed with the method encodedLength()
which is generally called before this method.
out
- the byte buffer to encode to.public int encodedLength()
public boolean equals(@Nullable @Nullable java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
@NotNull public MqttUserPropertiesImplBuilder.Default extend()
extend
in interface Mqtt5UserProperties
@NotNull public @NotNull java.lang.String toString()
toString
in class java.lang.Object