/** * Returns a grouped structure of attribute descriptors. Notice that * {@link BindableDescriptor}s are immutable, so the grouped descriptor set is * returned rather than grouping being applied to the receiver. * * @param groupingMethod the grouping method to be used * @return grouped descriptors */ public BindableDescriptor group(GroupingMethod groupingMethod) { if (this.groupedBy.equals(groupingMethod)) { return this; } else { return new BindableDescriptor(this.type, this.metadata, this.bindableDescriptorsInternal, this.attributeDescriptorsInternal, groupingMethod); } }
return new BindableDescriptor(this.type, this.metadata, filteredBindableDescriptors, filteredAttributeDescriptors, this.groupedBy);
return new BindableDescriptor(clazz, bindableMetadata, bindableDescriptors, attributeDescriptors);