org.apache.fop.layoutmgr

## Class SpaceSpecifier

- java.lang.Object
- - org.apache.fop.layoutmgr.SpaceSpecifier

- All Implemented Interfaces:
    java.lang.Cloneable

      public class SpaceSpecifier
      extends java.lang.Object
      implements java.lang.Cloneable

  Accumulate a sequence of space-specifiers (XSL space type) on areas with a stacking constraint. Provide a way to resolve these into a single MinOptMax value.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SpaceSpecifier(boolean startsReferenceArea)` Creates a new SpaceSpecifier.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addSpace(SpaceVal space)` Add a new space to the sequence.
    `void` | `clear()` Clear all space specifiers
    `java.lang.Object` | `clone()`
    `boolean` | `hasSpaces()` Indicates whether any space-specifiers have been added.
    `MinOptMax` | `resolve(boolean endsReferenceArea)` Resolve the current sequence of space-specifiers, accounting for forcing values.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SpaceSpecifier

          public SpaceSpecifier(boolean startsReferenceArea)

      Creates a new SpaceSpecifier.
      Parameters:
        `startsReferenceArea` - true if it starts a new reference area

  - ### Method Detail

    - #### clone

          public java.lang.Object clone()

      Overrides:
        `clone` in class `java.lang.Object`

    - #### clear

          public void clear()

      Clear all space specifiers

    - #### hasSpaces

          public boolean hasSpaces()

      Indicates whether any space-specifiers have been added.
      Returns:
        true if any space-specifiers have been added.

    - #### addSpace

          public void addSpace(SpaceVal space)

      Add a new space to the sequence. If this sequence starts a reference area, and the added space is conditional, and there are no non-conditional values in the sequence yet, then ignore it. Otherwise add it to the sequence.
      Parameters:
        `space` - the space to add.

    - #### resolve

          public MinOptMax resolve(boolean endsReferenceArea)

      Resolve the current sequence of space-specifiers, accounting for forcing values.
      Parameters:
        `endsReferenceArea` - whether the sequence should be resolved at the trailing edge of reference area.
      Returns:
        the resolved value as a min/opt/max triple.

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright 1999-2022 The Apache Software Foundation. All Rights Reserved.