com.dlsc.flexgantt.model.scheduling

## Class Violation

- java.lang.Object
- - com.dlsc.flexgantt.model.scheduling.Violation

-     public class Violation
      extends Object

  A violation object contains the most basic information about a constraint violation.
  Since:
    2.1
  Author:
    Dirk Lemmermann

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Violation(ViolationCode code, double actualBufferDuration)` Constructs a new violation, which carries the actual buffer duration and the type of violation (buffer too small or too large).

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getActualBufferDuration()` Returns the actual duration of the buffer when it violated the constraint.
    `ViolationCode` | `getCode()` Returns the violation code (buffer too small or too large).

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

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

- - ### Constructor Detail

    - #### Violation

          public Violation(ViolationCode code,
                           double actualBufferDuration)

      Constructs a new violation, which carries the actual buffer duration and the type of violation (buffer too small or too large).
      Parameters:
        `code` - buffer too small or too large
        `actualBufferDuration` - the actual buffer duration
      Since:
        2.1

  - ### Method Detail

    - #### getCode

          public ViolationCode getCode()

      Returns the violation code (buffer too small or too large).
      Returns:
        the violation code
      Since:
        2.1

    - #### getActualBufferDuration

          public double getActualBufferDuration()

      Returns the actual duration of the buffer when it violated the constraint.
      Returns:
        the duration of the buffer
      Since:
        2.1

Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.