com.metamatrix.common.tree.directory
Class FileDefinitionImpl

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

public class FileDefinitionImpl
extends ObjectDefinitionImpl
implements FileDefinition

See Also:
Serialized Form

Constructor Summary
FileDefinitionImpl()
          Create an empty definition object with all defaults.
FileDefinitionImpl(java.lang.String name)
          Create a definition object with the specified set of attributes.
FileDefinitionImpl(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

FileDefinitionImpl

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


FileDefinitionImpl

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

Parameters:
name - the name

FileDefinitionImpl

public FileDefinitionImpl(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 FileDefinition 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.