/* $Id$ */ package org.noreply.fancydress.type3; import org.noreply.fancydress.directory.*; import org.noreply.fancydress.status.*; import org.noreply.fancydress.type3.routing.*; import java.util.*; public class HalfPath { private Hop[] hops; public HalfPath(Hop[] hops) { this.hops = hops; } private String[] tokenize(String path) throws Mix3Exception { ArrayList nicks = new ArrayList(); int indexFrom = 0; int indexOf; while ((indexOf = path.indexOf(',', indexFrom)) != -1) { String v = path.substring(indexFrom, indexOf).trim(); if (v.equals("")) throw new Mix3Exception("Invalid path."); nicks.add( v ); indexFrom = indexOf + 1; } String v = path.substring(indexFrom).trim(); if (v.equals("")) throw new Mix3Exception("Invalid path."); nicks.add( v ); String[] result = new String[nicks.size()]; for (int i=0; i