Class ColumnWidthMetricsImpl

  • All Implemented Interfaces:
    org.refcodes.mixin.ColumnWidthAccessor, org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<ColumnWidthMetrics>, org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthMutator, org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthProperty, ColumnWidthMetrics
    Direct Known Subclasses:
    ColumnFormatMetricsImpl

    public class ColumnWidthMetricsImpl
    extends java.lang.Object
    implements ColumnWidthMetrics
    Implementation of the ColumnWidthMetrics interface.
    • Constructor Detail

      • ColumnWidthMetricsImpl

        public ColumnWidthMetricsImpl()
        Instantiates a new column width metrics impl.
      • ColumnWidthMetricsImpl

        public ColumnWidthMetricsImpl​(int aWidth,
                                      ColumnWidthType aWidthType)
        Constructs a column's width, either in percent (%) or in number of chars.
        Parameters:
        aWidth - The width for the column, either in percent (%) or in number of chars, depending on the provided ColumnWidthType .
        aWidthType - The type of the width being provided, either percent (%) or number of chars.
    • Method Detail

      • getColumnWidth

        public int getColumnWidth()
        Specified by:
        getColumnWidth in interface org.refcodes.mixin.ColumnWidthAccessor
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • setColumnWidth

        public void setColumnWidth​(int aColumnWidth)
        Specified by:
        setColumnWidth in interface org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthMutator
      • withColumnWidth

        public ColumnWidthMetrics withColumnWidth​(int aColumnWidth)
        Specified by:
        withColumnWidth in interface org.refcodes.mixin.ColumnWidthAccessor.ColumnWidthBuilder<ColumnWidthMetrics>
      • getColumnWidthType

        public ColumnWidthType getColumnWidthType()
        The type of the width being provided, either percent (%) or number of chars.
        Specified by:
        getColumnWidthType in interface ColumnWidthMetrics
        Returns:
        The column's width type, either percent (%) or number of chars.