KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > oddjob > designer > elements > schedule > Util


1 /*
2  * (c) Rob Gordon 2005
3  */

4 package org.oddjob.designer.elements.schedule;
5
6 import org.oddjob.designer.model.DesignAttribute;
7
8 /**
9  *
10  */

11 class Util {
12
13     static String JavaDoc constrainedToString(
14             DesignAttribute on,
15             DesignAttribute from,
16             DesignAttribute to) {
17         if (on.attribute() != null) {
18             return "on " + on.attribute();
19         }
20         String JavaDoc result = "";
21         if (from.attribute() != null) {
22             result = "from " + from.attribute();
23         }
24         if (to.attribute() != null) {
25             if (result.length() > 0) {
26                 result += " ";
27             }
28             result += "to " + from.attribute();
29         }
30         return result;
31     }
32     
33 }
34
Popular Tags