org.fuin.units4j.dependency
Class Package<DEP_TYPE extends Dependency>

java.lang.Object
  extended by org.fuin.units4j.dependency.Package<DEP_TYPE>
Type Parameters:
DEP_TYPE - Type of dependency.
All Implemented Interfaces:
org.fuin.utils4j.ToDebugStringCapable

public final class Package<DEP_TYPE extends Dependency>
extends Object
implements org.fuin.utils4j.ToDebugStringCapable

Package and it's allowed or disallowed dependencies (this depends on the context of this object. Two objects are considered equal if the names are equal.


Constructor Summary
Package(String name)
          Constructor with name.
Package(String name, String comment)
          Constructor with name and comment.
 
Method Summary
 boolean equals(Object obj)
          
 String getComment()
          Returns a comment why restrictions apply.
 List<DEP_TYPE> getDependencies()
          Returns the list of related packages.
 String getName()
          Returns the package name.
 int hashCode()
          
 String toDebugString()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Package

public Package(String name)
Constructor with name.

Parameters:
name - Name of the package - Cannot be null.

Package

public Package(String name,
               String comment)
Constructor with name and comment.

Parameters:
name - Name of the package - Cannot be null.
comment - Comment why restrictions apply.
Method Detail

getName

public final String getName()
Returns the package name.

Returns:
Name of the package.

getDependencies

public final List<DEP_TYPE> getDependencies()
Returns the list of related packages.

Returns:
List of package dependencies.

hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

getComment

public final String getComment()
Returns a comment why restrictions apply.

Returns:
Description of the restriction for all dependencies in the package.

toString

public final String toString()

Overrides:
toString in class Object

toDebugString

public String toDebugString()

Specified by:
toDebugString in interface org.fuin.utils4j.ToDebugStringCapable


Copyright © 2012 Future Invent Informationsmanagement GmbH. All Rights Reserved.