1 Reply Latest reply on Apr 27, 2010 10:01 PM by 843807

    Setter for wrapper Boolean

      The Javabeans specifications state the following:-

      +8.3.2 Boolean properties+
      In addition, for boolean properties, we allow a getter method to match the pattern:
      public boolean is();
      This &ldquo;is<PropertyName>&rdquo; method may be provided instead of a &ldquo;get<PropertyName>&rdquo; method,
      or it may be provided in addition to a &ldquo;get<PropertyName>&rdquo; method.
      In either case, if the &ldquo;is<PropertyName>&rdquo; method is present for a boolean property then we will
      use the &ldquo;is<PropertyName>&rdquo; method to read the property value.
      An example boolean property might be:
      public boolean isMarsupial();
      public void setMarsupial(boolean m);
      I am not clear whether it is legal for a Wrapper Class Boolean to have a getter as :-
      public Boolean is();
      Any suggestions with references are welcome.