package org.mydalayer.parsing.builder;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

import org.mydalayer.client.support.Configuration;

/**
 *
 * @author mydalayer#gmail.com
 * @version 1.0.0
 */
public abstract class BaseBuilder {
  protected final Configuration configuration;

  public BaseBuilder(Configuration configuration) {
    this.configuration = configuration;
  }

  public Configuration getConfiguration() {
    return configuration;
  }

  /**
   * 功能描述：是否为空，为空则赋默认值<br>
   * 返回值: Boolean <说明>
   */
  protected Boolean booleanValueOf(String value, Boolean defaultValue) {
    return value == null ? defaultValue : Boolean.valueOf(value);
  }

  /**
   * 功能描述：是否为空，为空则赋默认值<br>
   * 返回值: Integer <说明>
   */
  protected Integer integerValueOf(String value, Integer defaultValue) {
    return value == null ? defaultValue : Integer.valueOf(value);
  }

  /**
   * 功能描述：是否为空，为空则赋默认值<br>
   * 返回值: Set<String> <说明>
   */
  protected Set<String> stringSetValueOf(String value, String defaultValue) {
    String value1 = value == null ? defaultValue : value;
    return new HashSet<String>(Arrays.asList(value1.split(",")));
  }

}

@@ -33,16 +33,68 @@
 ilder;%0A%0A
+import org.mydalayer.client.support.Configuration;%0A%0A
 import j
@@ -163,60 +163,8 @@
 t;%0A%0A
-import org.mydalayer.client.support.Configuration;%0A%0A
 /**%0A
@@ -490,47 +490,76 @@
   * 
-%E5%8A%9F%E8%83%BD%E6%8F%8F%E8%BF%B0%EF%BC%9A%E6%98%AF%E5%90%A6%E4%B8%BA%E7%A9%BA%EF%BC%8C%E4%B8%BA%E7%A9%BA%E5%88%99%E8%B5%8B%E9%BB%98%E8%AE%A4%E5%80%BC%3Cbr%3E%0A   * %E8%BF%94%E5%9B%9E%E5%80%BC:
+String %22true%22/%22false%22 to Boolean Obj.%3Cbr%3E%0A   * %0A   * @return
  Boolean
  %3C%E8%AF%B4%E6%98%8E
@@ -554,21 +554,16 @@
  Boolean
- %3C%E8%AF%B4%E6%98%8E%3E
 %0A   */%0A 
@@ -720,47 +720,68 @@
   * 
-%E5%8A%9F%E8%83%BD%E6%8F%8F%E8%BF%B0%EF%BC%9A%E6%98%AF%E5%90%A6%E4%B8%BA%E7%A9%BA%EF%BC%8C%E4%B8%BA%E7%A9%BA%E5%88%99%E8%B5%8B%E9%BB%98%E8%AE%A4%E5%80%BC%3Cbr%3E%0A   * %E8%BF%94%E5%9B%9E%E5%80%BC:
+String number to Integer Obj.%3Cbr%3E%0A   * %0A   * @return
  Integer
  %3C%E8%AF%B4%E6%98%8E
@@ -776,21 +776,16 @@
  Integer
- %3C%E8%AF%B4%E6%98%8E%3E
 %0A   */%0A 
@@ -942,56 +942,82 @@
   * 
-%E5%8A%9F%E8%83%BD%E6%8F%8F%E8%BF%B0%EF%BC%9A%E6%98%AF%E5%90%A6%E4%B8%BA%E7%A9%BA%EF%BC%8C%E4%B8%BA%E7%A9%BA%E5%88%99%E8%B5%8B%E9%BB%98%E8%AE%A4%E5%80%BC%3Cbr%3E%0A   * %E8%BF%94%E5%9B%9E%E5%80%BC: Set%3CString%3E %3C%E8%AF%B4%E6%98%8E%3E
+String str split by %22,%22 to Set Obj.%3Cbr%3E%0A   * %0A   * @return Set type String
 %0A   

Modify using Google Java code style and format