Package org.capnproto

Class StructList.Builder<T extends StructBuilder>

    • Constructor Detail

    • Method Detail

      • get

        public final T get​(int index)
      • setWithCaveats

        public final <U extends StructReader> void setWithCaveats​(StructFactory<T,​U> factory,
                                                                  int index,
                                                                  U value)
      • asReader

        public final <U extends StructReaderStructList.Reader<U> asReader​(StructFactory<T,​U> factory)
        Sets the list element, with the following limitation based on the fact that structs in a struct list are allocated inline: if the source struct is larger than the target struct (as can happen if it was created with a newer version of the schema), then it will be truncated, losing fields. TODO: rework generics, so that we don't need this factory parameter