Code example for TreeMap

0
            throw new NullPointerException("visibility == null");
        } 
 
        this.type = type;
        this.visibility = visibility;
        this.elements = new TreeMap<CstUtf8, NameValuePair>();
    } 
 
    /** {@inheritDoc} */ 
    @Override 
    public boolean equals(Object other) {
        if (! (other instanceof Annotation)) {
            return false; 
        } 
 
        Annotation otherAnnotation = (Annotation) other;
 
        if (! (type.equals(otherAnnotation.type)
                        && (visibility == otherAnnotation.visibility))) {
            return false; 
        }