hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r659185 - /httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/message/HeaderGroup.java
Date Thu, 22 May 2008 18:07:37 GMT
Author: olegk
Date: Thu May 22 11:07:36 2008
New Revision: 659185

URL: http://svn.apache.org/viewvc?rev=659185&view=rev
Log:
Added #copy method to the HeaderGroup class

Modified:
    httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/message/HeaderGroup.java

Modified: httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/message/HeaderGroup.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/message/HeaderGroup.java?rev=659185&r1=659184&r2=659185&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/message/HeaderGroup.java
(original)
+++ httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/message/HeaderGroup.java
Thu May 22 11:07:36 2008
@@ -275,6 +275,17 @@
         return new BasicListHeaderIterator(this.headers, name);
     }
     
+    /**
+     * Returns a copy of this object
+     * 
+     * @return copy of this object
+     */
+    public HeaderGroup copy() {
+        HeaderGroup clone = new HeaderGroup();
+        clone.headers.addAll(this.headers);
+        return clone;
+    }
+    
     public Object clone() throws CloneNotSupportedException {
         HeaderGroup clone = (HeaderGroup) super.clone();
         clone.headers = new ArrayList(this.headers);



Mime
View raw message