`CyclicSortOrderingException.java`

    // FILE. . . . . /home/hak/hlt/src/hlt/osfv2/exec/CyclicSortOrderingException.java
    // EDIT BY . . . Hassan Ait-Kaci
    // ON MACHINE. . Hak-Laptop
    // STARTED ON. . Tue Jan 21 08:10:42 2014

Author: |  | Hassan Aït-Kaci
Copyright: |  | © by the author
Version: |  | Last modified on Tue Jan 21 08:11:06 2014 by hak

    package hlt.osf.exec;

    import hlt.language.util.ArrayList;

    public class CyclicSortOrderingException extends RuntimeException
    {
      private ArrayList _cycles;

      public CyclicSortOrderingException (String msg)
      {
        super(msg);
      }

      public CyclicSortOrderingException (ArrayList cycles)
      {
        _cycles = cycles;
      }

Returns a string consisting of a message followed by the cycles detected.

      public String getMessage ()
      {
        int size = _cycles.size();

        StringBuilder buf = new StringBuilder("Cyclic sort ordering; "+size+" cycle"+(size>1?"s":"")+" detected:\n");

        for (int i=0; i<size; i++)
          buf.append("***        Cycle -> "+_cycles.get(i)+(i<size-1?"\n":""));

        return buf.toString();
      }

    }

This file was generated on Tue Jan 21 09:56:10 CET 2014 from file `CyclicSortOrderingException.java`
by the `hlt.language.tools.Hilite` Java tool written by Hassan Aït-Kaci