[]
        
(Showing Draft Content)

PivotFieldNumberGroupOptions

Class PivotFieldNumberGroupOptions

java.lang.Object
com.grapecity.documents.excel.PivotFieldNumberGroupOptions

public class PivotFieldNumberGroupOptions extends Object
Represents the settings used to group a PivotField into numeric ranges.

Use this class to configure the numeric range and interval used by IPivotField.group(PivotFieldNumberGroupOptions). By default, the group range is determined from the PivotCache and the interval is 1.


 PivotFieldNumberGroupOptions options = new PivotFieldNumberGroupOptions();
 options.setAutoStart(false);
 options.setAutoEnd(false);
 options.setStart(10348d);
 options.setEnd(10407d);
 options.setInterval(20);
 double interval = options.getInterval();
 
  • Constructor Details

    • PivotFieldNumberGroupOptions

      public PivotFieldNumberGroupOptions()
  • Method Details

    • getStart

      public Double getStart()
      Gets the first number included in the grouped range.

      When getAutoStart() is true, this value is ignored and the first number is determined from the PivotCache.

      
       PivotFieldNumberGroupOptions options = new PivotFieldNumberGroupOptions();
       options.setAutoStart(false);
       options.setStart(0d);
       Double start = options.getStart();
       
      Returns:
      The first number included in the grouped range. Returns null if no explicit start value is set.
    • setStart

      public void setStart(Double value)
      Sets the first number included in the grouped range.

      When getAutoStart() is true, this value is ignored and the first number is determined from the PivotCache.

      
       PivotFieldNumberGroupOptions options = new PivotFieldNumberGroupOptions();
       options.setAutoStart(false);
       options.setStart(0d);
       Double start = options.getStart();
       
      Parameters:
      value - The first number included in the grouped range. Use null to clear the explicit start value.
    • getEnd

      public Double getEnd()
      Gets the ending number used to derive the grouped range.

      Generated buckets are left-closed and right-open. When getAutoEnd() is true, this value is ignored and the last number is determined from the PivotCache.

      
       PivotFieldNumberGroupOptions options = new PivotFieldNumberGroupOptions();
       options.setAutoEnd(false);
       options.setEnd(100d);
       Double end = options.getEnd();
       
      Returns:
      The ending number used to derive the grouped range. Returns null if no explicit end value is set.
    • setEnd

      public void setEnd(Double value)
      Sets the ending number used to derive the grouped range.

      Generated buckets are left-closed and right-open. When getAutoEnd() is true, this value is ignored and the last number is determined from the PivotCache.

      
       PivotFieldNumberGroupOptions options = new PivotFieldNumberGroupOptions();
       options.setAutoEnd(false);
       options.setEnd(100d);
       Double end = options.getEnd();
       
      Parameters:
      value - The ending number used to derive the grouped range. Use null to clear the explicit end value.
    • getAutoStart

      public boolean getAutoStart()
      Gets whether the first number is determined from the PivotCache instead of getStart().
      
       PivotFieldNumberGroupOptions options = new PivotFieldNumberGroupOptions();
       options.setAutoStart(false);
       boolean autoStart = options.getAutoStart();
       
      Returns:
      true if the first number is determined from the PivotCache instead of getStart(); otherwise, false.
    • setAutoStart

      public void setAutoStart(boolean value)
      Sets whether the first number is determined from the PivotCache instead of getStart().
      
       PivotFieldNumberGroupOptions options = new PivotFieldNumberGroupOptions();
       options.setAutoStart(false);
       boolean autoStart = options.getAutoStart();
       
      Parameters:
      value - true to determine the first number from the PivotCache; false to use the value set by setStart(Double). When this is false, a start value is required when grouping is applied.
    • getAutoEnd

      public boolean getAutoEnd()
      Gets whether the last number is determined from the PivotCache instead of getEnd().
      
       PivotFieldNumberGroupOptions options = new PivotFieldNumberGroupOptions();
       options.setAutoEnd(false);
       boolean autoEnd = options.getAutoEnd();
       
      Returns:
      true if the last number is determined from the PivotCache instead of getEnd(); otherwise, false.
    • setAutoEnd

      public void setAutoEnd(boolean value)
      Sets whether the last number is determined from the PivotCache instead of getEnd().
      
       PivotFieldNumberGroupOptions options = new PivotFieldNumberGroupOptions();
       options.setAutoEnd(false);
       boolean autoEnd = options.getAutoEnd();
       
      Parameters:
      value - true to determine the last number from the PivotCache; false to use the value set by setEnd(Double). When this is false, an end value is required when grouping is applied.
    • getInterval

      public double getInterval()
      Gets the numeric interval used to create each generated group.
      
       PivotFieldNumberGroupOptions options = new PivotFieldNumberGroupOptions();
       options.setInterval(10);
       double interval = options.getInterval();
       
      Returns:
      The numeric interval used to create each generated group. The default value is 1.
    • setInterval

      public void setInterval(double value)
      Sets the numeric interval used to create each generated group.

      The interval must be greater than 0 and finite when grouping is applied. The effective start value must also be less than the effective end value.

      
       PivotFieldNumberGroupOptions options = new PivotFieldNumberGroupOptions();
       options.setInterval(10);
       double interval = options.getInterval();
       
      Parameters:
      value - The numeric interval used to create each generated group.