01: package org.ztemplates.actions.urlhandler.tree.match;
02:
03: import org.ztemplates.actions.util.ZFormatUtil;
04:
05: public class ZSegmentTail extends ZSegment {
06: private final String name;
07:
08: public ZSegmentTail(String name) {
09: super ();
10: this .name = name;
11: }
12:
13: public String getName() {
14: return name;
15: }
16:
17: public void toXml(StringBuffer sb, int depth) {
18: ZFormatUtil.indent(sb, depth);
19:
20: sb.append("<tail name=\"" + name + "\"/>");
21: }
22:
23: @Override
24: public boolean isMatchingTheSame(ZSegment other) {
25: if (other instanceof ZSegmentTail) {
26: return true;
27: }
28: return false;
29: }
30:
31: @Override
32: public String toDefinition() {
33: return "*{" + name + "}";
34: }
35: }
|