package org.basex.util.options;


/**
 * Single option, stored in {@link Options} instances.
 *
 * @author BaseX Team 2005-14, BSD License
 * @author Christian Gruen
 * @param <O> option type
 */
@SuppressWarnings("unused")
public abstract class Option<O> {
  /** Name. */
  private final String name;

  /**
   * Constructor without default value.
   * @param name name
   */
  Option(final String name) {
    this.name = name;
  }

  /**
   * Returns the name of the option.
   * @return name
   */
  public String name() {
    return name;
  }

  /**
   * Returns the default value.
   * @return default value
   */
  public abstract Object value();

  /**
   * Copies mutable default values. Otherwise, returns the existing instance.
   * @return default value
   */
  public Object copy() {
    return value();
  }

  @Override
  public String toString() {
    final StringBuilder sb = new StringBuilder(name());
    final Object v = value();
    if(v != null && !v.toString().isEmpty()) sb.append('=').append(v);
    return sb.toString();
  }
}

@@ -193,36 +193,8 @@
  */%0A
-@SuppressWarnings(%22unused%22)%0A
 publ
@@ -603,21 +603,16 @@
 stract O
-bject
  value()
@@ -741,21 +741,16 @@
 public O
-bject
  copy() 

Use type parameter in `Option`.