FileDocCategorySizeDatePackage
FromHeader.javaAPI DocphoneME MR2 API (J2ME)3211Wed May 02 18:00:42 BST 2007gov.nist.siplite.header

FromHeader

public final class FromHeader extends AddressParametersHeader
FromHeader SIP Header This code is in the public domain.

Fields Summary
public static final String
TAG
Label for tag.
public static final String
NAME
Label for from header field.
public static Class
clazz
Class handle.
Constructors Summary
public FromHeader()
Default constructor.

    
     
        clazz = new FromHeader().getClass();
    
        super(FROM);
    
public FromHeader(ToHeader to)
Generate a FROM header from a TO header.

param
to target receipient

        super(FROM);
        this.address = (Address) to.address.clone();
        this.parameters = (NameValueList) to.parameters.clone();
    
Methods Summary
public booleanequals(java.lang.Object otherHeader)
Compares two from headers for equality.

param
otherHeader Object to set
return
true if the two headers are the same, false otherwise.

        if (otherHeader == null || address == null)
            return false;
        if (!otherHeader.getClass().equals(this.getClass())) {
            return false;
        }
        
        return super.equals(otherHeader);
    
public java.lang.StringgetTag()
Gets the tag parameter from the address parm list.

return
String

        return super.getParameter(FromHeader.TAG);
    
public booleanhasTag()
Returns true if the tag label is found.

return
true if this header has a Tag, false otherwise.

        return super.hasParameter(TAG);
        
    
public voidremoveTag()
Removes the Tag field.

        super.removeParameter(TAG);
        
    
public voidsetTag(java.lang.String tag)
Sets the tag member.

param
tag String to set.

        super.setParameter(TAG, tag);