Package net.morimekta.providence.util
Class Empty
- java.lang.Object
-
- net.morimekta.providence.util.Empty
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Empty>,PMessage<Empty,Empty._Field>,PValue<Empty>,BinaryWriter,net.morimekta.util.Stringable
@Generated("providence-maven-plugin") @Immutable public class Empty extends java.lang.Object implements PMessage<Empty,Empty._Field>, java.lang.Comparable<Empty>, java.io.Serializable, BinaryWriterDummy struct that is just empty. Can be used to "ignore" everything.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEmpty._BuilderDummy struct that is just empty.static classEmpty._Field
-
Field Summary
Fields Modifier and Type Field Description static PStructDescriptor<Empty,Empty._Field>kDescriptor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringasString()Pure string representation of content.static Empty._Builderbuilder()Make aputil.Emptybuilder.intcompareTo(Empty other)PStructDescriptor<Empty,Empty._Field>descriptor()booleanequals(java.lang.Object o)<T> Tget(int key)booleanhas(int key)inthashCode()Empty._Buildermutate()Get a builder that extends the current object.static PStructDescriptorProvider<Empty,Empty._Field>provider()java.lang.StringtoString()intwriteBinary(net.morimekta.util.io.BigEndianBinaryWriter writer)Write the current message to the binary writer.
-
-
-
Field Detail
-
kDescriptor
public static final PStructDescriptor<Empty,Empty._Field> kDescriptor
-
-
Method Detail
-
has
public boolean has(int key)
- Specified by:
hasin interfacePMessage<Empty,Empty._Field>- Parameters:
key- The key of the field.- Returns:
- Whether the field is present.
-
get
public <T> T get(int key)
- Specified by:
getin interfacePMessage<Empty,Empty._Field>- Type Parameters:
T- The return type.- Parameters:
key- The key of the field.- Returns:
- The value of the field.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
asString
@Nonnull public java.lang.String asString()
Description copied from interface:PMessagePure string representation of content. Does not contain type info.- Specified by:
asStringin interfacePMessage<Empty,Empty._Field>- Specified by:
asStringin interfacenet.morimekta.util.Stringable- Returns:
- String representation.
-
compareTo
public int compareTo(Empty other)
- Specified by:
compareToin interfacejava.lang.Comparable<Empty>
-
writeBinary
public int writeBinary(net.morimekta.util.io.BigEndianBinaryWriter writer) throws java.io.IOExceptionDescription copied from interface:BinaryWriterWrite the current message to the binary writer. NOTE: This method is not intended to be used directly. Instead use theBinarySerializer.serialize(OutputStream, PMessage)call.- Specified by:
writeBinaryin interfaceBinaryWriter- Parameters:
writer- The binary writer to write to.- Returns:
- The number of bytes written.
- Throws:
java.io.IOException- If it failed to write the message for any reason.
-
mutate
@Nonnull public Empty._Builder mutate()
Description copied from interface:PMessageGet a builder that extends the current object.- Specified by:
mutatein interfacePMessage<Empty,Empty._Field>- Returns:
- The builder instance.
-
provider
@Nonnull public static PStructDescriptorProvider<Empty,Empty._Field> provider()
-
descriptor
@Nonnull public PStructDescriptor<Empty,Empty._Field> descriptor()
- Specified by:
descriptorin interfacePMessage<Empty,Empty._Field>- Specified by:
descriptorin interfacePValue<Empty>
-
builder
public static Empty._Builder builder()
Make aputil.Emptybuilder.- Returns:
- The builder instance.
-
-