# FLASHStrategy (ARX Developer Documentation)

org.deidentifier.arx.algorithm

## Class FLASHStrategy

- java.lang.Object
- - org.deidentifier.arx.algorithm.FLASHStrategy

- All Implemented Interfaces:
    java.util.Comparator<java.lang.Integer>

      public class FLASHStrategy
      extends java.lang.Object
      implements java.util.Comparator<java.lang.Integer>

  This class implements a total order on all transformations in the search space. It is used by the Flash algorithm to achieve stable execution times.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FLASHStrategy(SolutionSpace solutionSpace, GeneralizationHierarchy[] hierarchies)` Creates a new instance.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(java.lang.Integer n1, java.lang.Integer n2)` Compares transformations.

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

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

    - ### Methods inherited from interface java.util.Comparator

      `equals`

- - ### Constructor Detail

    - #### FLASHStrategy

          public FLASHStrategy(SolutionSpace solutionSpace,
                       GeneralizationHierarchy[] hierarchies)

      Creates a new instance.
      Parameters:
        `solutionSpace` - the solution space
        `hierarchies` - the hierarchies

  - ### Method Detail

    - #### compare

          public int compare(java.lang.Integer n1,
                    java.lang.Integer n2)

      Compares transformations.
      Specified by:
        `compare` in interface `java.util.Comparator<java.lang.Integer>`
      Parameters:
        `n1` - the n1
        `n2` - the n2
      Returns:
        the int