// ** This class was generated with DemFGen (vers:11/09/2009)

package edu.neu.ccs.demeterf.http.classes;

import edu.neu.ccs.demeterf.lib.*;
import java.net.Socket;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.PrintWriter;
import java.io.InputStreamReader;
import java.io.InputStream;




/** Representation of MsgHead */
public class MsgHead{
    protected final ident key;
    protected final ident value;

    /** Construct a(n) MsgHead Instance */
    public MsgHead(ident key, ident value){
        this.key = key;
        this.value = value;
    }
    /** Is the given object Equal to this MsgHead? */
    public boolean equals(Object o){
        if(!(o instanceof MsgHead))return false;
        if(o == this)return true;
        MsgHead oo = (MsgHead)o;
        return (((Object)key).equals(oo.key))&&(((Object)value).equals(oo.value));
    }
    /** Parse an instance of MsgHead from the given String */
    public static MsgHead parse(String inpt) throws ParseException{
        return new TheParser(new java.io.StringReader(inpt)).parse_MsgHead();
    }
    /** Parse an instance of MsgHead from the given Stream */
    public static MsgHead parse(java.io.InputStream inpt) throws ParseException{
        return new TheParser(inpt).parse_MsgHead();
    }
    /** Parse an instance of MsgHead from the given Reader */
    public static MsgHead parse(java.io.Reader inpt) throws ParseException{
        return new TheParser(inpt).parse_MsgHead();
    }

    /** Field Class for MsgHead.key */
    public static class key extends edu.neu.ccs.demeterf.Fields.any{}
    /** Field Class for MsgHead.value */
    public static class value extends edu.neu.ccs.demeterf.Fields.any{}

    /** Create a MsgHeader from key/value Strings */
    public MsgHead(String k, String v){ this(new ident(k), new ident(v)); }

    /** DGP method from Class PrintHeapToString */
    public String toString(){ return edu.neu.ccs.demeterf.http.classes.PrintHeapToString.PrintHeapToStringM(this); }
    /** Getter for field MsgHead.value */
    public ident getValue(){ return value; }
    /** Getter for field MsgHead.key */
    public ident getKey(){ return key; }

}