/** * @return The size of a single component in octets */ @Value.Derived default int componentSizeOctets() { return (int) Math.ceil((double) this.componentSizeBits() / 8.0); }
/** * @return The size of a single component in octets */ @Value.Derived default int componentSizeOctets() { return (int) Math.ceil((double) this.componentSizeBits() / 8.0); }
SMFSupportedSizes.checkIntegerSignedSupported(this.componentSizeBits()); break; SMFSupportedSizes.checkIntegerUnsignedSupported(this.componentSizeBits()); break; SMFSupportedSizes.checkFloatSupported(this.componentSizeBits()); break;
SMFSupportedSizes.checkIntegerSignedSupported(this.componentSizeBits()); break; SMFSupportedSizes.checkIntegerUnsignedSupported(this.componentSizeBits()); break; SMFSupportedSizes.checkFloatSupported(this.componentSizeBits()); break;
/** * Fill a builder with attribute values from the provided {@code SMFAttributeType} instance. * Regular attribute values will be replaced with those from the given instance. * Absent optional values will not replace present values. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ public final Builder from(SMFAttributeType instance) { Objects.requireNonNull(instance, "instance"); setName(instance.name()); setComponentType(instance.componentType()); setComponentCount(instance.componentCount()); setComponentSizeBits(instance.componentSizeBits()); return this; }
/** * Fill a builder with attribute values from the provided {@code SMFAttributeType} instance. * Regular attribute values will be replaced with those from the given instance. * Absent optional values will not replace present values. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ public final Builder from(SMFAttributeType instance) { Objects.requireNonNull(instance, "instance"); setName(instance.name()); setComponentType(instance.componentType()); setComponentCount(instance.componentCount()); setComponentSizeBits(instance.componentSizeBits()); return this; }