Skip to Content.
Sympa Menu

notify-dpml - r1427 - trunk/main/lang/process/src/main/net/dpml/lang/product

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1427 - trunk/main/lang/process/src/main/net/dpml/lang/product
  • Date: Mon, 1 May 2006 21:01:32 +0200

Author: mcconnell
Date: 2006-05-01 21:01:30 +0200 (Mon, 01 May 2006)
New Revision: 1427

Modified:

trunk/main/lang/process/src/main/net/dpml/lang/product/AbstractProductDirective.java

trunk/main/lang/process/src/main/net/dpml/lang/product/DirectoryProductDirective.java
Log:
add directory product

Modified:
trunk/main/lang/process/src/main/net/dpml/lang/product/AbstractProductDirective.java
===================================================================
---
trunk/main/lang/process/src/main/net/dpml/lang/product/AbstractProductDirective.java
2006-05-01 18:55:15 UTC (rev 1426)
+++
trunk/main/lang/process/src/main/net/dpml/lang/product/AbstractProductDirective.java
2006-05-01 19:01:30 UTC (rev 1427)
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Stephen J. McConnell
+ * Copyright 2006 Stephen J. McConnell
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,7 +25,7 @@
import net.dpml.lang.AbstractDirective;

/**
- * The ProductDirective class describes a product instance such as a file or
directory.
+ * The AbstractProductDirective class describes a product instance such as a
file or directory.
*
* @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
* @version @PROJECT-VERSION@

Modified:
trunk/main/lang/process/src/main/net/dpml/lang/product/DirectoryProductDirective.java
===================================================================
---
trunk/main/lang/process/src/main/net/dpml/lang/product/DirectoryProductDirective.java
2006-05-01 18:55:15 UTC (rev 1426)
+++
trunk/main/lang/process/src/main/net/dpml/lang/product/DirectoryProductDirective.java
2006-05-01 19:01:30 UTC (rev 1427)
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Stephen J. McConnell
+ * Copyright 2006 Stephen J. McConnell
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,14 +16,8 @@
* limitations under the License.
*/

-package net.dpml.lang.process;
+package net.dpml.lang.product;

-import java.util.Arrays;
-import java.util.ArrayList;
-import java.util.Properties;
-
-import net.dpml.lang.AbstractDirective;
-
/**
* The DirectoryProductDirective class describes a working directory.
*
@@ -32,47 +26,38 @@
*/
public class DirectoryProductDirective extends AbstractProductDirective
{
- public ProductDirective( final String name, final String description )
+ public ProductDirective( final String name, final String description,
String path )
{
super( name, description );
+
+ if( null == path )
+ {
+ throw new NullPointerException( "path" );
+ }
+
+ m_path = path;
}

/**
* Get the product name.
* @return the product name.
*/
- public String getName()
+ public String getPath()
{
- return m_name;
+ return m_path;
}

/**
- * Get the product description.
- * @return the product description.
- */
- public String getDescription()
- {
- return m_description;
- }
-
- /**
* Compare this object with another for equality.
* @param other the other object
* @return true if equal
*/
public boolean equals( Object other )
{
- if( super.equals( other ) && ( other instanceof ProductDirective ) )
+ if( super.equals( other ) && ( other instanceof
DirectoryProductDirective ) )
{
- ProductDirective object = (ProductDirective) other;
- if( !m_name.equals( object.m_name ) )
- {
- return false;
- }
- else
- {
- return equals( m_description, object.m_description );
- }
+ DirectoryProductDirective object = (DirectoryProductDirective)
other;
+ return m_path.equals( object.m_path ) )
}
else
{
@@ -87,8 +72,7 @@
public int hashCode()
{
int hash = super.hashCode();
- hash ^= hashValue( m_name );
- hash ^= hashValue( m_description );
+ hash ^= hashValue( m_path );
return hash;
}
}




  • r1427 - trunk/main/lang/process/src/main/net/dpml/lang/product, mcconnell at BerliOS, 05/01/2006

Archive powered by MHonArc 2.6.24.

Top of Page