public LinkObject(String url,Map<String,?> attributes){
  this.url=url;
  if (attributes != null) {
    this.attributes=Collections.unmodifiableMap(new HashMap<String,Object>(attributes));
  }
 else {
    this.attributes=Collections.unmodifiableMap(new HashMap<String,Object>());
  }
}

public LinkObject ( String url , Map < String , ? > attributes ) { this . url = url ; if ( attributes != null ) { this . attributes = Collections . unmodifiableMap ( new HashMap < String , Object > ( attributes ) ) ; } else { this . attributes = Collections . unmodifiableMap ( new HashMap < String , Object > ( ) ) ; } }
creates a new instance from a url and attributes .
