com.metamatrix.common.tree.directory
Class FolderDefinitionImpl

java.lang.Object
  extended by com.metamatrix.common.object.ObjectDefinitionImpl
      extended by com.metamatrix.common.tree.directory.FolderDefinitionImpl
All Implemented Interfaces:
ObjectDefinition, PropertiedObject, FolderDefinition, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable

public class FolderDefinitionImpl
extends ObjectDefinitionImpl
implements FolderDefinition

See Also:
Serialized Form

Constructor Summary
FolderDefinitionImpl()
          Create an empty definition object with all defaults.
FolderDefinitionImpl(java.lang.String name)
          Create a definition object with the specified set of attributes.
FolderDefinitionImpl(java.lang.String name, java.lang.String displayName)
          Create a definition object with the specified set of attributes.
 
Method Summary
 int compareTo(java.lang.Object obj)
          Compares this object to another.
 boolean equals(java.lang.Object obj)
          Returns true if the specified object is semantically equal to this instance.
 
Methods inherited from class com.metamatrix.common.object.ObjectDefinitionImpl
clone, computeDisplayName, computePluralDisplayName, getDisplayName, getName, getPluralDisplayName, getShortDescription, getShortDisplayName, hashCode, setDisplayName, setName, setPluralDisplayName, setShortDescription, setShortDisplayName, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.metamatrix.common.object.ObjectDefinition
getDisplayName, getName, getPluralDisplayName, getShortDescription, getShortDisplayName, toString
 

Constructor Detail

FolderDefinitionImpl

public FolderDefinitionImpl()
Create an empty definition object with all defaults.


FolderDefinitionImpl

public FolderDefinitionImpl(java.lang.String name)
Create a definition object with the specified set of attributes.

Parameters:
name - the name

FolderDefinitionImpl

public FolderDefinitionImpl(java.lang.String name,
                            java.lang.String displayName)
Create a definition object with the specified set of attributes.

Parameters:
name - the name
Method Detail

compareTo

public int compareTo(java.lang.Object obj)
Compares this object to another. If the specified object is an instance of the FolderDefinition class, then this method compares the contents; otherwise, it throws a ClassCastException (as instances are comparable only to instances of the same class).

Note: this method is consistent with equals(), meaning that (compare(x, y)==0) == (x.equals(y)).

Specified by:
compareTo in interface ObjectDefinition
Specified by:
compareTo in interface java.lang.Comparable
Overrides:
compareTo in class ObjectDefinitionImpl
Parameters:
obj - the object that this instance is to be compared to.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object, respectively.
Throws:
java.lang.IllegalArgumentException - if the specified object reference is null
java.lang.ClassCastException - if the specified object's type prevents it from being compared to this instance.

equals

public boolean equals(java.lang.Object obj)
Returns true if the specified object is semantically equal to this instance. Note: this method is consistent with compareTo().

Specified by:
equals in interface ObjectDefinition
Overrides:
equals in class ObjectDefinitionImpl
Parameters:
obj - the object that this instance is to be compared to.
Returns:
whether the object is equal to this object.


Copyright © 2009. All Rights Reserved.