CyclicSortOrderingException.html

`CyclicSortOrderingException.java`

    // FILE. . . . . /home/hak/hlt/src/hlt/osf/exec/CyclicSortOrderingException.java
    // EDIT BY . . . Hassan Ait-Kaci
    // ON MACHINE. . Hp-Dv7
    // STARTED ON. . Mon Nov 05 18:05:54 2012

Author: |  | Hassan Aït-Kaci
Copyright: |  | © by the author
Version: |  | Last modified on Sun Nov 18 01:23:01 2012 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 ()
      {
        StringBuilder buf = new StringBuilder("Cyclic sort ordering detected:\n");

        int last = _cycles.size()-1;

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

        return buf.toString();
      }

    }

This file was generated on Wed Jan 30 13:26:29 CET 2013 from file `CyclicSortOrderingException.java`
by the `hlt.language.tools.Hilite` Java tool written by Hassan Aït-Kaci