@Test public void testGetRootLevelMember() { final RecordStructureField field = mock(RecordStructureField.class); final AbstractParentRecordStructureMember list = mock(AbstractParentRecordStructureMember.class); final RecordStructure toRetrieve = new RecordStructure(name, Arrays.asList(field, list)); assertThat(toRetrieve.<RecordStructureField> getRootLevelMember(0)).isEqualTo(field); assertThat(toRetrieve.<RecordStructureField> getRootLevelMember(1)).isEqualTo(list); }
@SuppressWarnings("unchecked") public <T extends RecordStructureMember> T getRootLevelMember(final int index) { return (T) members.get(index); }
RecordStructure implements Described, Named { @SuppressWarnings("unchecked") public <T extends RecordStructureMember> T getRootLevelMember(final int index) { return (T) members.get(index); } }
RecordStructure implements Described, Named { @SuppressWarnings("unchecked") public <T extends RecordStructureMember> T getRootLevelMember(final int index) { return (T) members.get(index); } RecordStructure(final String name, final List<? extends RecordStructureMember> members);  RecordStructure(final String name, final List<? extends RecordStructureMember> members,
            final String description, final InterfaceStructureType structureType); }
RecordStructure implements Described, Named { @SuppressWarnings("unchecked") public <T extends RecordStructureMember> T getRootLevelMember(final int index) { return (T) members.get(index); } RecordStructure(final String name, final List<? extends RecordStructureMember> members);  RecordStructure(final String name, final List<? extends RecordStructureMember> members,
            final String description, final InterfaceStructureType structureType); @Override boolean equals(final Object obj); @Override String getDescription(); @Override String getName(); @SuppressWarnings("unchecked") T getRootLevelMember(final int index); int getRootLevelMemberCount(); InterfaceStructureType getStructureType(); @Override int hashCode(); @Override String toString(); }
RecordStructure implements Described, Named { @SuppressWarnings("unchecked") public <T extends RecordStructureMember> T getRootLevelMember(final int index) { return (T) members.get(index); } RecordStructure(final String name, final List<? extends RecordStructureMember> members);  RecordStructure(final String name, final List<? extends RecordStructureMember> members,
            final String description, final InterfaceStructureType structureType); @Override boolean equals(final Object obj); @Override String getDescription(); @Override String getName(); @SuppressWarnings("unchecked") T getRootLevelMember(final int index); int getRootLevelMemberCount(); InterfaceStructureType getStructureType(); @Override int hashCode(); @Override String toString();  }