/*
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 *
 */

package com.xpn.xwiki.doc;

import java.io.Serializable;


public class XWikiLink extends Object implements Serializable {
    private long docId;
    private String link;
    private String fullName;


    public XWikiLink(){
        this.setDocId(0);
    }

    public XWikiLink(long docId) {
        this.setDocId(docId);
    }

    public XWikiLink(long docId, String link,String fullName) {
        this.setDocId(docId);
        this.setLink(link);
        this.setFullName(fullName);
    }

    public long getDocId() {
        return docId;
    }

    public void setDocId(long docId) {
        this.docId = docId;
    }


    public void setLink(String link) {
        this.link=link;
    }

    public String getLink() {
        return link;
    }

    public String getFullName() {
        return fullName;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    public boolean equals(Object obj) {
      XWikiLink objlink = (XWikiLink) obj;
      return ((objlink.getDocId()==getDocId())&&(objlink.getLink().equals(getLink())));
    }

    public int hashCode(){
    return ("" + getDocId() + link ).hashCode();
    }
}

@@ -949,17 +949,16 @@
 zable;%0A%0A
-%0A
 public c
@@ -1010,17 +1010,17 @@
 alizable
- 
+%0A
 %7B%0A    pr
@@ -1033,24 +1033,25 @@
 long docId;%0A
+%0A
     private 
@@ -1059,24 +1059,25 @@
 tring link;%0A
+%0A
     private 
@@ -1094,17 +1094,16 @@
 lName;%0A%0A
-%0A
     publ
@@ -1116,16 +1116,21 @@
 kiLink()
+%0A    
 %7B%0A      
@@ -1180,32 +1180,36 @@
 Link(long docId)
+%0A   
  %7B%0A        this.
@@ -1277,16 +1277,17 @@
 ng link,
+ 
 String f
@@ -1286,32 +1286,36 @@
 String fullName)
+%0A   
  %7B%0A        this.
@@ -1428,16 +1428,20 @@
 tDocId()
+%0A   
  %7B%0A     
@@ -1450,16 +1450,21 @@
  return 
+this.
 docId;%0A 
@@ -1505,16 +1505,20 @@
 g docId)
+%0A   
  %7B%0A     
@@ -1547,17 +1547,16 @@
 %0A    %7D%0A%0A
-%0A
     publ
@@ -1583,16 +1583,20 @@
 ng link)
+%0A   
  %7B%0A     
@@ -1607,17 +1607,19 @@
 his.link
-=
+ = 
 link;%0A  
@@ -1650,16 +1650,20 @@
 etLink()
+%0A   
  %7B%0A     
@@ -1672,16 +1672,21 @@
  return 
+this.
 link;%0A  
@@ -1721,16 +1721,20 @@
 llName()
+%0A   
  %7B%0A     
@@ -1743,16 +1743,21 @@
  return 
+this.
 fullName
@@ -1809,16 +1809,20 @@
 ullName)
+%0A   
  %7B%0A     
@@ -1849,32 +1849,125 @@
 ullName;%0A    %7D%0A%0A
+    /**%0A     * %7B@inheritDoc%7D%0A     * %0A     * @see Object#equals(Object)%0A     */%0A    @Override%0A
     public boole
@@ -1987,19 +1987,25 @@
 ect obj)
+%0A   
  %7B%0A
+  
       XW
@@ -2045,24 +2045,25 @@
 ;%0A      
+  
 return 
-(
 (objlink
@@ -2077,10 +2077,12 @@
 Id()
+ 
 ==
+ 
 getD
@@ -2091,12 +2091,12 @@
 Id()
-)&&(
+ && 
 objl
@@ -2127,17 +2127,16 @@
 Link()))
-)
 ;%0A    %7D%0A
@@ -2128,32 +2128,121 @@
 ink()));%0A    %7D%0A%0A
+    /**%0A     * %7B@inheritDoc%7D%0A     * %0A     * @see Object#hashCode()%0A     */%0A    @Override%0A
     public int h
@@ -2250,22 +2250,31 @@
 shCode()
-%7B
 %0A    
+%7B%0A        
 return (
@@ -2291,21 +2291,25 @@
 cId() + 
+this.
 link
- 
 ).hashCo

Apply codestyle, improve javadoc