edu.umich.eecs.tac.props
Class ManufacturerComponentComposable

java.lang.Object
  extended by edu.umich.eecs.tac.props.AbstractTransportable
      extended by edu.umich.eecs.tac.props.ManufacturerComponentComposable
All Implemented Interfaces:
java.io.Serializable, se.sics.isl.transport.Transportable
Direct Known Subclasses:
Product, Query

public class ManufacturerComponentComposable
extends AbstractTransportable

The manufacturer component composable holds a manufacturer and component. This is the superclass of the Query and Product classes.

Author:
Patrick Jordan
See Also:
Serialized Form

Constructor Summary
ManufacturerComponentComposable()
          Creates a manufacturer component composable.
 
Method Summary
protected  void calculateHashCode()
          Returns the calculated hash code.
protected  boolean composableEquals(ManufacturerComponentComposable o)
          Returns true if a manufacturer component composable has the same manufacturer and component.
 boolean equals(java.lang.Object o)
          Returns true if the object is a manufacturer component composable that has the same manufacturer and component.
 java.lang.String getComponent()
          Returns the string representing the component.
 java.lang.String getManufacturer()
          The string representing the manufacturer.
 int hashCode()
          Returns the precalculated hash code.
protected  void readWithLock(se.sics.isl.transport.TransportReader reader)
          Reads the manufacturer and component from the reader.
 void setComponent(java.lang.String component)
          Sets the string representing the component.
 void setManufacturer(java.lang.String manufacturer)
          Set the string representing the manufacturer.
 java.lang.String toString()
          Returns a string representation of the manufacturer component composable.
protected  void writeWithLock(se.sics.isl.transport.TransportWriter writer)
          Writes the manufacturer and component to the writer.
 
Methods inherited from class edu.umich.eecs.tac.props.AbstractTransportable
getTransportName, isLocked, lock, lockCheck, read, write
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ManufacturerComponentComposable

public ManufacturerComponentComposable()
Creates a manufacturer component composable.

Method Detail

getManufacturer

public final java.lang.String getManufacturer()
The string representing the manufacturer.

Returns:
the string representing the manufacturer. May be null.

setManufacturer

public final void setManufacturer(java.lang.String manufacturer)
Set the string representing the manufacturer.

Parameters:
manufacturer - the string representing the manufacturer. May be null if the manufacturer is not included in the query.

getComponent

public final java.lang.String getComponent()
Returns the string representing the component.

Returns:
the string representing the component. May be null.

setComponent

public final void setComponent(java.lang.String component)
                        throws java.lang.IllegalStateException
Sets the string representing the component.

Parameters:
component - the string representing the component. May be null if the component is not included in the query.
Throws:
java.lang.IllegalStateException - if the object is locked.

readWithLock

protected final void readWithLock(se.sics.isl.transport.TransportReader reader)
                           throws java.text.ParseException
Reads the manufacturer and component from the reader.

Specified by:
readWithLock in class AbstractTransportable
Parameters:
reader - the reader to read data from.
Throws:
java.text.ParseException - if an exception occurs while reading the manufacturer and component.

writeWithLock

protected final void writeWithLock(se.sics.isl.transport.TransportWriter writer)
Writes the manufacturer and component to the writer.

Specified by:
writeWithLock in class AbstractTransportable
Parameters:
writer - the writer to write data to.

hashCode

public final int hashCode()
Returns the precalculated hash code.

Overrides:
hashCode in class java.lang.Object
Returns:
precalculated hash code.

calculateHashCode

protected final void calculateHashCode()
Returns the calculated hash code.


toString

public final java.lang.String toString()
Returns a string representation of the manufacturer component composable.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the manufacturer component composable.

composableEquals

protected final boolean composableEquals(ManufacturerComponentComposable o)
Returns true if a manufacturer component composable has the same manufacturer and component.

Parameters:
o - the other manufacturer component composable.
Returns:
true if a manufacturer component composable has the same manufacturer and component.

equals

public final boolean equals(java.lang.Object o)
Returns true if the object is a manufacturer component composable that has the same manufacturer and component.

Overrides:
equals in class java.lang.Object
Parameters:
o - the object being compared.
Returns:
true if the object is a manufacturer component composable that has the same manufacturer and component.


Copyright © 2007-2009 Association for Trading Agent Research. All Rights Reserved.