KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > thaiopensource > validate > FlagOption


1 package com.thaiopensource.validate;
2
3 import com.thaiopensource.util.PropertyId;
4
5 public class FlagOption implements Option {
6   private final FlagPropertyId pid;
7   public FlagOption(FlagPropertyId pid) {
8     this.pid = pid;
9   }
10
11   public PropertyId getPropertyId() {
12     return pid;
13   }
14
15   public Object JavaDoc valueOf(String JavaDoc arg) throws OptionArgumentException {
16     if (arg != null)
17       throw new OptionArgumentPresenceException();
18     return Flag.PRESENT;
19   }
20
21   public Object JavaDoc combine(Object JavaDoc[] values) {
22     return null;
23   }
24 }
25
Popular Tags