com.mucommander.bookmark
Class Bookmark

java.lang.Object
  extended by com.mucommander.bookmark.Bookmark
All Implemented Interfaces:
java.lang.Cloneable

public class Bookmark
extends java.lang.Object
implements java.lang.Cloneable

Represents a bookmark.

Bookmarks are simple name/location pairs:

Author:
Maxence Bernard

Constructor Summary
Bookmark(java.lang.String name, java.lang.String location)
          Creates a new Bookmark using the given name and location.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of this bookmark.
 boolean equals(java.lang.Object object)
           
 java.lang.String getLocation()
          Returns this bookmark's location which should normally designate a path or file URL, but which isn't necessarily valid nor exists.
 java.lang.String getName()
          Returns this bookmark's name.
 void setLocation(java.lang.String newLocation)
          Changes this bookmark's location to the given one and fires an event to registered BookmarkListener instances.
 void setName(java.lang.String newName)
          Changes this bookmark's name to the given one and fires an event to registered BookmarkListener instances.
 java.lang.String toString()
          Returns the bookmark's name.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Bookmark

public Bookmark(java.lang.String name,
                java.lang.String location)
Creates a new Bookmark using the given name and location.

Parameters:
name - name given to this bookmark
location - location (path or URL) this bookmark points to
Method Detail

getName

public java.lang.String getName()
Returns this bookmark's name.

Returns:
this bookmark's name.
See Also:
setName(String)

setName

public void setName(java.lang.String newName)
Changes this bookmark's name to the given one and fires an event to registered BookmarkListener instances.

Parameters:
newName - bookmark's new name.
See Also:
getName()

getLocation

public java.lang.String getLocation()
Returns this bookmark's location which should normally designate a path or file URL, but which isn't necessarily valid nor exists.

Returns:
this bookmark's location.
See Also:
setLocation(String)

setLocation

public void setLocation(java.lang.String newLocation)
Changes this bookmark's location to the given one and fires an event to registered BookmarkListener instances.

Parameters:
newLocation - bookmark's new location.
See Also:
getLocation()

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns a clone of this bookmark.

Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

toString

public java.lang.String toString()
Returns the bookmark's name.

Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object


This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard