// Path: src/main/java/xpertss/mime/Header.java
// public interface Header {
// 
//    /**
//     * Http defines four types of headers. All headers not specifically
//     * defined to be general, request, or response are treated as entity
//     * headers.
//     */
//    public enum Type {
//       /**
//        * A general header is one that may be included in either the request or
//        * response and is applied to the overall message itself.
//        */
//       General,
// 
//       /**
//        * A request header is applied only to impl requests and applies to the
//        * message overall.
//        */
//       Request,
// 
//       /**
//        * A response header is applied only to impl responses and applies to the
//        * message overall.
//        */
//       Response,
// 
//       /**
//        * An entity header defines the entity contained within the message.
//        */
//       Entity,
// 
//       /**
//        * A raw header is any header for which a defined parser was not found.
//        * These are typically non-standard headers and will always return an
//        * unparsed raw string when getValue is called.
//        */
//       Raw
//    }
// 
// 
//    /**
//     * Returns the header name as a String.
//     */
//    public String getName();
// 
//    /**
//     * Returns a fully formatted value line including all values and their
//     * associated parameters. This method  provides an easier means of access
//     * to simple values.
//     */
//    public String getValue();
// 
//    /**
//     * Returns the header type this header represents.
//     */
//    public Type getType();
// 
// 
//    /**
//     * Returns the number of values this header contains.
//     */
//    public int size();
// 
//    /**
//     * Returns the header value at the specified index.
//     */
//    public HeaderValue getValue(int index);
// 
//    /**
//     * Returns the specified named header value if it exists.
//     */
//    public HeaderValue getValue(String name);
// 
// 
//    /**
//     * Return a formatted string representation of this header and its values
//     * and parameters.
//     */
//    public String toString();
// 
// 
// }
// 
// Path: src/main/java/xpertss/mime/HeaderValue.java
// public interface HeaderValue {
// 
// 
//    /**
//     * Ths will return the value's name or {@code null} if it is not a
//     * named value.
//     */
//    public String getName();
// 
//    /**
//     * This will return the value's value.
//     */
//    public String getValue();
// 
// 
// 
// 
// 
//    /**
//     * Returns the number of parameters this header value contains.
//     */
//    public int size();
// 
//    /**
//     * Returns the parameter at the specified index.
//     */
//    public Parameter getParameter(int index);
// 
//    /**
//     * Returns the specified named parameter if it exists.
//     */
//    public Parameter getParameter(String name);
// 
// 
// 
//    /**
//     * Return a formatted string representation of this header value and its
//     * parameters.
//     */
//    public String toString();
// 
// }


import xpertss.mime.Header;
import xpertss.mime.HeaderValue;
import xpertss.lang.Objects;
import xpertss.lang.Strings;
/**
 * Copyright XpertSoftware All rights reserved.
 *
 * Date: 3/18/11 11:55 PM
 */
package xpertss.mime.impl;


public class ComplexValueHeader implements Header {

   private final String name;
   private final Type type;
   private final HeaderValue[] values;

   public ComplexValueHeader(String name, Type type, HeaderValue[] values)
   {
      this.name = Objects.notNull(name, "name");
      this.type = Objects.notNull(type, "type");
      this.values = Objects.notNull(values, "values");
   }

   public String getName()
   {
// Path: src/main/java/xpertss/mime/Header.java
// public interface Header {
// 
//    /**
//     * Http defines four types of headers. All headers not specifically
//     * defined to be general, request, or response are treated as entity
//     * headers.
//     */
//    public enum Type {
//       /**
//        * A general header is one that may be included in either the request or
//        * response and is applied to the overall message itself.
//        */
//       General,
// 
//       /**
//        * A request header is applied only to impl requests and applies to the
//        * message overall.
//        */
//       Request,
// 
//       /**
//        * A response header is applied only to impl responses and applies to the
//        * message overall.
//        */
//       Response,
// 
//       /**
//        * An entity header defines the entity contained within the message.
//        */
//       Entity,
// 
//       /**
//        * A raw header is any header for which a defined parser was not found.
//        * These are typically non-standard headers and will always return an
//        * unparsed raw string when getValue is called.
//        */
//       Raw
//    }
// 
// 
//    /**
//     * Returns the header name as a String.
//     */
//    public String getName();
// 
//    /**
//     * Returns a fully formatted value line including all values and their
//     * associated parameters. This method  provides an easier means of access
//     * to simple values.
//     */
//    public String getValue();
// 
//    /**
//     * Returns the header type this header represents.
//     */
//    public Type getType();
// 
// 
//    /**
//     * Returns the number of values this header contains.
//     */
//    public int size();
// 
//    /**
//     * Returns the header value at the specified index.
//     */
//    public HeaderValue getValue(int index);
// 
//    /**
//     * Returns the specified named header value if it exists.
//     */
//    public HeaderValue getValue(String name);
// 
// 
//    /**
//     * Return a formatted string representation of this header and its values
//     * and parameters.
//     */
//    public String toString();
// 
// 
// }
// 
// Path: src/main/java/xpertss/mime/HeaderValue.java
// public interface HeaderValue {
// 
// 
//    /**
//     * Ths will return the value's name or {@code null} if it is not a
//     * named value.
//     */
//    public String getName();
// 
//    /**
//     * This will return the value's value.
//     */
//    public String getValue();
// 
// 
// 
// 
// 
//    /**
//     * Returns the number of parameters this header value contains.
//     */
//    public int size();
// 
//    /**
//     * Returns the parameter at the specified index.
//     */
//    public Parameter getParameter(int index);
// 
//    /**
//     * Returns the specified named parameter if it exists.
//     */
//    public Parameter getParameter(String name);
// 
// 
// 
//    /**
//     * Return a formatted string representation of this header value and its
//     * parameters.
//     */
//    public String toString();
// 
// }


// Path: src/main/java/xpertss/mime/impl/ComplexValueHeader.java
import xpertss.mime.Header;
import xpertss.mime.HeaderValue;
import xpertss.lang.Objects;
import xpertss.lang.Strings;

/**
 * Copyright XpertSoftware All rights reserved.
 *
 * Date: 3/18/11 11:55 PM
 */
package xpertss.mime.impl;


public class ComplexValueHeader implements Header {

   private final String name;
   private final Type type;
   private final HeaderValue[] values;

   public ComplexValueHeader(String name, Type type, HeaderValue[] values)
   {
      this.name = Objects.notNull(name, "name");
      this.type = Objects.notNull(type, "type");
      this.values = Objects.notNull(values, "values");
   }

   public String getName()
   {
      return name;