@Test public void testAddMembers() { Group.Builder parent = Group.builder(); Structure.Builder<?> structb = Structure.builder().setName("struct").setParentGroupBuilder(parent) .addMemberVariable("one", DataType.BYTE, "").addMemberVariable("two", DataType.CHAR, ""); Variable.Builder<?> two = Variable.builder().setName("two").setDataType(DataType.FLOAT); assertThat(structb.replaceMemberVariable(two)).isTrue(); assertThat(structb.removeMemberVariable("one")).isTrue(); assertThat(structb.removeMemberVariable("nope")).isFalse(); assertThat(structb.findMemberVariable("nope").isPresent()).isFalse(); assertThat(structb.findMemberVariable("one").isPresent()).isFalse(); assertThat(structb.findMemberVariable("two").isPresent()).isTrue(); Variable.Builder<?> vb = structb.findMemberVariable("two").orElse(null); assertThat(vb).isNotNull(); assertThat(vb.dataType).isEqualTo(DataType.FLOAT); }
public static Builder<?> builder() { return new Builder2(); }
Structure extends Variable { public static Builder<?> builder() { return new Builder2(); } }
Structure extends Variable { public static Builder<?> builder() { return new Builder2(); } protected  Structure(Builder<?> builder, Group parentGroup); }
Structure extends Variable { public static Builder<?> builder() { return new Builder2(); } protected  Structure(Builder<?> builder, Group parentGroup); @Nullable Variable findVariable(String shortName); int getNumberOfMemberVariables(); @Override int getElementSize(); ImmutableList<Variable> getVariables(); ImmutableList<String> getVariableNames(); boolean isSubset(); StructureMembers makeStructureMembers(); Structure select(List<String> memberNames); Structure select(String varName); @Deprecated StructureData readStructure(int index); @Deprecated ArrayStructure readStructure(int start, int count); @Deprecated StructureDataIterator getStructureIterator(); @Deprecated StructureDataIterator getStructureIterator(int bufferSize); String getNameAndAttributes(); @Override Builder<?> toBuilder(); static Builder<?> builder(); }
Structure extends Variable { public static Builder<?> builder() { return new Builder2(); } protected  Structure(Builder<?> builder, Group parentGroup); @Nullable Variable findVariable(String shortName); int getNumberOfMemberVariables(); @Override int getElementSize(); ImmutableList<Variable> getVariables(); ImmutableList<String> getVariableNames(); boolean isSubset(); StructureMembers makeStructureMembers(); Structure select(List<String> memberNames); Structure select(String varName); @Deprecated StructureData readStructure(int index); @Deprecated ArrayStructure readStructure(int start, int count); @Deprecated StructureDataIterator getStructureIterator(); @Deprecated StructureDataIterator getStructureIterator(int bufferSize); String getNameAndAttributes(); @Override Builder<?> toBuilder(); static Builder<?> builder();  }