Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.bouncycastle.util.io.pem;

Class representing a PEM header (name, value) pair.
 
 public class PemHeader
 {
     private String name;
     private String value;

    
Base constructor.

Parameters:
name name of the header property.
value value of the header property.
    public PemHeader(String nameString value)
    {
        this. = name;
        this. = value;
    }
    public String getName()
    {
        return ;
    }
    public String getValue()
    {
        return ;
    }
    public int hashCode()
    {
        return getHashCode(this.) + 31 * getHashCode(this.);    
    }
    public boolean equals(Object o)
    {
        if (!(o instanceof PemHeader))
        {
            return false;
        }
        PemHeader other = (PemHeader)o;
        return other == this || (isEqual(this.other.name) && isEqual(this.other.value));
    }
    private int getHashCode(String s)
    {
        if (s == null)
        {
            return 1;
        }
        return s.hashCode();
    }
    private boolean isEqual(String s1String s2)
    {
        if (s1 == s2)
        {
            return true;
        }
        if (s1 == null || s2 == null)
        {
            return false;
        }
        return s1.equals(s2);
    }
New to GrepCode? Check out our FAQ X