    1   /*
    2    * Copyright 1999-2004 The Apache Software Foundation
    3    *
    4    * Licensed under the Apache License, Version 2.0 (the "License");
    5    * you may not use this file except in compliance with the License.
    6    * You may obtain a copy of the License at
    7    *
    8    *     http://www.apache.org/licenses/LICENSE-2.0
    9    *
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.
    15   */
    16  package org.apache.commons.jxpath;
    17
    18  /***
    19   * A general purpose JavaBean for JUnit tests for the "jxpath" component.
    20   *
    21   * @author Dmitri Plotnikov
    22   * @version $Revision: 1.8 $ $Date: 2004/02/29 14:17:40 $
    23   */
    24  public class NestedTestBean {
    25      private String name = "Name 0";
    26      private int integer = 1;
    27
    28      public NestedTestBean() {
    29      }
    30
    31      public NestedTestBean(String name) {
    32          this.name = name;
    33      }
    34
    35      public void setName(String name) {
    36          this.name = name;
    37      }
    38
    39      /***
    40       * A read-only boolean property
    41       */
    42      public boolean isBoolean() {
    43          return false;
    44      }
    45
    46      /***
    47       * A read-only int property
    48       */
    49      public int getInt() {
    50          return integer;
    51      }
    52
    53      public void setInt(int value) {
    54          this.integer = value;
    55      }
    56
    57      /***
    58       * A read-only String property
    59       */
    60      public String getName() {
    61          return name;
    62      }
    63
    64      private String[] strings =
    65          new String[] { "String 1", "String 2", "String 3" };
    66
    67      public String[] getStrings() {
    68          return strings;
    69      }
    70
    71      public void setStrings(String[] array) {
    72          strings = array;
    73      }
    74
    75      public String toString() {
    76          return "Nested: " + name;
    77      }
    78  }