de.smartics.properties.api.core.domain
Class DocumentName

Package class diagram package DocumentName
java.lang.Object
  extended by de.smartics.properties.api.core.domain.DocumentName
All Implemented Interfaces:
Serializable, Comparable< DocumentName>

public final class DocumentName
     
     
extends Object
implements Serializable, Comparable< DocumentName>

The name of a document is unique within a documentation in the context of a given project. The project name together with the document name makes the document uniquely identifiable.

See Also:
Serialized Form

Constructor Summary
DocumentName(String name)
          Default constructor.
 
Method Summary
 int compareTo(DocumentName o)
           Compares the names of the instances.
 boolean equals(Object object)
          Returns true if the given object is semantically equal to the given object, false otherwise.
 String getName()
          Returns the name identifier of the document.
 int hashCode()
          Returns the hash code of the object.
 String toString()
          Returns the string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DocumentName

public DocumentName(String name)
             throws NullPointerException,
                    IllegalArgumentException
Default constructor.

Parameters:
name - the name identifier of the document.
Throws:
NullPointerException - if name is null.
IllegalArgumentException - if name is blank.
Method Detail

getName

public String getName()
Returns the name identifier of the document.

Returns:
the name identifier of the document.

compareTo

public int compareTo(DocumentName o)

Compares the names of the instances.

Specified by:
compareTo in interface Comparable<DocumentName>

hashCode

public int hashCode()
Returns the hash code of the object.

Overrides:
hashCode in class Object
Returns:
the hash code.

equals

public boolean equals(Object object)
Returns true if the given object is semantically equal to the given object, false otherwise.

Two instances are considered equal, if their name is equal.

Overrides:
equals in class Object
Parameters:
object - the instance to compare to.
Returns:
true if the given object is semantically equal to the given object, false otherwise.

toString

public String toString()
Returns the string representation of the object.

Overrides:
toString in class Object
Returns:
the string representation of the object.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.