Ignore:
Timestamp:
09/05/14 19:33:12 (10 years ago)
Author:
rkrimmel
Message:

Used Eclipse code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/AlignmentAlgorithmFactory.java

    r1616 r1733  
    11package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms; 
    22 
     3public class AlignmentAlgorithmFactory { 
    34 
    4 public class AlignmentAlgorithmFactory { 
    5          
    6         public static void setDefaultAlgorithm(String algorithmname) { 
    7                 //TODO: check for valid algorihm class names here 
    8                 algorithmclass = algorithmname; 
    9         } 
    10          
    11         private static String algorithmclass = "de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.SmithWatermanRepeated"; 
    12          
    13          
    14          
    155        public static AlignmentAlgorithm create() { 
    166                Class<?> newclass; 
    177                Object object = null; 
    188                try { 
    19                          newclass = Class.forName(algorithmclass); 
    20                          object = newclass.newInstance(); 
    21                          
    22                 } catch (ClassNotFoundException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException e) { 
     9                        newclass = Class.forName(algorithmclass); 
     10                        object = newclass.newInstance(); 
     11 
     12                } catch (ClassNotFoundException | SecurityException 
     13                                | InstantiationException | IllegalAccessException 
     14                                | IllegalArgumentException e) { 
    2315                        e.printStackTrace(); 
    2416                } 
    2517                return (AlignmentAlgorithm) object; 
    2618        } 
     19 
     20        public static void setDefaultAlgorithm(String algorithmname) { 
     21                // TODO: check for valid algorihm class names here 
     22                algorithmclass = algorithmname; 
     23        } 
     24 
     25        private static String algorithmclass = "de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.SmithWatermanRepeated"; 
    2726} 
Note: See TracChangeset for help on using the changeset viewer.