Class SMFB2Section

    • Method Detail

      • id

        public long id()
        Specified by:
        id in interface SMFB2SectionType
        Returns:
        The identifier of this section
      • offset

        public long offset()
        Specified by:
        offset in interface SMFB2SectionType
        Returns:
        The absolute offset of the start of the section
      • sizeTotal

        public long sizeTotal()
        Specified by:
        sizeTotal in interface SMFB2SectionType
        Returns:
        The total size of the section: The size of the data plus the header
      • withId

        public final SMFB2Section withId​(long value)
        Copy the current immutable object by setting a value for the id attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for id
        Returns:
        A modified copy of the this object
      • withSizeOfData

        public final SMFB2Section withSizeOfData​(long value)
        Copy the current immutable object by setting a value for the sizeOfData attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for sizeOfData
        Returns:
        A modified copy of the this object
      • withOffset

        public final SMFB2Section withOffset​(long value)
        Copy the current immutable object by setting a value for the offset attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for offset
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(java.lang.Object another)
        This instance is equal to all instances of SMFB2Section that have equal attribute values.
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: id, sizeOfData, offset, sizeTotal.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

        public java.lang.String toString()
        Prints the immutable value SMFB2Section with attribute values.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of the value
      • of

        public static SMFB2Section of​(long id,
                                      long sizeOfData,
                                      long offset)
        Construct a new immutable SMFB2Section instance.
        Parameters:
        id - The value for the id attribute
        sizeOfData - The value for the sizeOfData attribute
        offset - The value for the offset attribute
        Returns:
        An immutable SMFB2Section instance
      • copyOf

        public static SMFB2Section copyOf​(SMFB2SectionType instance)
        Creates an immutable copy of a SMFB2SectionType value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
        Parameters:
        instance - The instance to copy
        Returns:
        A copied immutable SMFB2Section instance
      • builder

        public static SMFB2Section.Builder builder()
        Creates a builder for SMFB2Section.
         SMFB2Section.builder()
            .setId(long) // required id
            .setSizeOfData(long) // required sizeOfData
            .setOffset(long) // required offset
            .build();
         
        Returns:
        A new SMFB2Section builder