Skip to Content.
Sympa Menu

notify-dpml - r1420 - in trunk/main/lang/process/src: . main main/net main/net/dpml main/net/dpml/lang main/net/dpml/lang/process

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: r1420 - in trunk/main/lang/process/src: . main main/net main/net/dpml main/net/dpml/lang main/net/dpml/lang/process
  • Date: Sat, 29 Apr 2006 23:41:15 +0200

Author: mcconnell
Date: 2006-04-29 23:41:08 +0200 (Sat, 29 Apr 2006)
New Revision: 1420

Added:
trunk/main/lang/process/src/main/
trunk/main/lang/process/src/main/net/
trunk/main/lang/process/src/main/net/dpml/
trunk/main/lang/process/src/main/net/dpml/lang/
trunk/main/lang/process/src/main/net/dpml/lang/process/

trunk/main/lang/process/src/main/net/dpml/lang/process/ProductDirective.java
Log:
moving forward with product/process model

Added:
trunk/main/lang/process/src/main/net/dpml/lang/process/ProductDirective.java
===================================================================
---
trunk/main/lang/process/src/main/net/dpml/lang/process/ProductDirective.java
2006-04-29 20:22:24 UTC (rev 1419)
+++
trunk/main/lang/process/src/main/net/dpml/lang/process/ProductDirective.java
2006-04-29 21:41:08 UTC (rev 1420)
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2005 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.lang.process;
+
+import java.util.Arrays;
+import java.util.ArrayList;
+import java.util.Properties;
+
+import net.dpml.lang.AbstractDirective;
+
+/**
+ * The ProductDirective class describes a product instance such as a file or
directory.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public abstract class ProductDirective extends AbstractDirective
+{
+ private final String m_name;
+ private final String m_description;
+
+ public ProductDirective( final String name, final String description )
+ {
+ if( null == name )
+ {
+ throw new NullPointerException( "name" );
+ }
+ m_name = name;
+ m_description = description;
+ }
+
+ /**
+ * Get the product name.
+ * @return the product name.
+ */
+ public String getName()
+ {
+ return m_name;
+ }
+
+ /**
+ * 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 ) )
+ {
+ ProductDirective object = (ProductDirective) other;
+ if( !m_name.equals( object.m_name ) )
+ {
+ return false;
+ }
+ else
+ {
+ return equals( m_description, object.m_description );
+ }
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ /**
+ * Compute the hash value.
+ * @return the hashcode value
+ */
+ public int hashCode()
+ {
+ int hash = super.hashCode();
+ hash ^= hashValue( m_name );
+ hash ^= hashValue( m_description );
+ return hash;
+ }
+}




  • r1420 - in trunk/main/lang/process/src: . main main/net main/net/dpml main/net/dpml/lang main/net/dpml/lang/process, mcconnell at BerliOS, 04/29/2006

Archive powered by MHonArc 2.6.24.

Top of Page