trait StructBuilderFactory[T <: ThriftStruct] extends AnyRef
A trait that provides an interface for building a new StructBuilder[T].
When added to the companion object, it makes it possible to create a T statically
without needing to call newBuilder() on an instance. For example, calling
Struct.newBuilder(). In this case, there will be no default values set for each
field, making it necessary for the caller to set all the fields in the struct.
- Alphabetic
- By Inheritance
- StructBuilderFactory
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def newBuilder(): StructBuilder[T]
A builder to create a new instance of T.
A builder to create a new instance of T.
For default values: - Call
newBuilder()on an instance of the struct - Set an individual field in the struct withbuilder.setField(index, value)while all other fields will be the same as the instance on whichnewBuilder()was called - Set all the fields in the struct withbuilder.setAllFields(seqOfValues)For a static builder without any default values: - Call
newBuilder()on the struct object (i.e.T.newBuilder()) - Set an individual field in the struct withbuilder.setField(index, value). No other fields will be set so it is imperative that the caller sets all of the struct fields manually withsetFieldorsetAllFields- Set all the fields in the struct withbuilder.setAllFields(seqOfValues)Finally, call
builder.build()to build the new T.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()