From 8f901521633a8603f9544bf05d0bb6777eae81cc Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Wed, 12 Nov 2003 10:05:54 +0000 Subject: Further clean up PathSpec --- src/org/noreply/fancydress/type3/PathSpec.java | 115 +++++++++++-------------- 1 file changed, 51 insertions(+), 64 deletions(-) (limited to 'src/org/noreply') diff --git a/src/org/noreply/fancydress/type3/PathSpec.java b/src/org/noreply/fancydress/type3/PathSpec.java index 07c24da..9c83679 100644 --- a/src/org/noreply/fancydress/type3/PathSpec.java +++ b/src/org/noreply/fancydress/type3/PathSpec.java @@ -209,61 +209,54 @@ public class PathSpec { } /** - * A class holding a list of Servers and a Crossover point location. + * make a Path from a serverlist an a crossover point. + * + * @param servers a list of servers, for null elements a random recommended server is chosen + * @param crossoverPoint place the crossover point before this server. + * + * @throws Mix3PathProblemException if no useable random servers can be found */ - private class ServerlistWithCrossover { - public Server[] servers; - public int crossoverPoint; - - public ServerlistWithCrossover(Server[] servers, int crossoverPoint) { - this.servers = servers; - this.crossoverPoint = crossoverPoint; - } - - private void fillInRandoms() throws Mix3PathProblemException { - Server[] recommended = dir.getRecommendedServers(); - for (int i=servers.length-1; i>=0 ; i--) { - if (servers[i] != null) - continue; - ArrayList s = new ArrayList(); - for (int r=0; r=0 ; i--) { + if (servers[i] != null) + continue; + ArrayList s = new ArrayList(); + for (int r=0; r