Esempio n. 1
0
        public override int HashCode()
        {
            // We sum up the hash codes for all of the strings. This
            // way, the order of the strings is irrelevant
            int code = 0;

            code += PrimaryType_Renamed.HashCode();
            code += SubType_Renamed.HashCode();
            code += Parameters_Renamed.HashCode();
            return(code);
        }         // hashCode()
Esempio n. 2
0
        /// <summary>
        /// Returns a clone of this object. </summary>
        /// <returns> a clone of this object </returns>

        public virtual Object Clone()
        {
            MimeType newObj = null;

            try
            {
                newObj = (MimeType)base.Clone();
            }
            catch (CloneNotSupportedException)
            {
            }
            newObj.Parameters_Renamed = (MimeTypeParameterList)Parameters_Renamed.Clone();
            return(newObj);
        }
Esempio n. 3
0
 /// <summary>
 /// Return the String representation of this object.
 /// </summary>
 public override String ToString()
 {
     return(BaseType + Parameters_Renamed.ToString());
 }
Esempio n. 4
0
 /// <summary>
 /// Remove any value associated with the given name.
 ///
 /// @throw IllegalArgumentExcpetion if parameter may not be deleted
 /// </summary>
 public virtual void RemoveParameter(String name)
 {
     Parameters_Renamed.Remove(name);
 }
Esempio n. 5
0
 /// <summary>
 /// Set the value to be associated with the given name, replacing
 /// any previous association.
 ///
 /// @throw IllegalArgumentException if parameter or value is illegal
 /// </summary>
 public virtual void SetParameter(String name, String value)
 {
     Parameters_Renamed.Set(name, value);
 }
Esempio n. 6
0
 /// <summary>
 /// Retrieve the value associated with the given name, or null if there
 /// is no current association.
 /// </summary>
 public virtual String GetParameter(String name)
 {
     return(Parameters_Renamed.Get(name));
 }