net.walend.digraph.test
Class TestBean
java.lang.Object
|
+--net.walend.digraph.test.TestBean
- All Implemented Interfaces:
- HasState, java.io.Serializable
- public class TestBean
- extends java.lang.Object
- implements HasState, java.io.Serializable
An object for testing Digraphs
- Since:
- 20010621
- Author:
- David Walend dfw1@cornell.edu
- See Also:
- Serialized Form
Field Summary |
private java.lang.String |
string
|
Constructor Summary |
TestBean(java.lang.String guts)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
string
private java.lang.String string
TestBean
public TestBean(java.lang.String guts)
getString
public java.lang.String getString()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getPrincipleInterface
public java.lang.Class getPrincipleInterface()
- Description copied from interface:
HasState
- Returns the class's principle interface for state comparisons. If two objects have different principle interfaces, they never have the same state.
- Specified by:
getPrincipleInterface
in interface HasState
sameStateAs
public boolean sameStateAs(HasState victim)
- Description copied from interface:
HasState
- If two HasStates have the same internal state, return true.
For objects with subobjects, Generally this method should only return true if the internal objects are equal. Implement a contentsHaveSameState() method to determine if the contents have the same state.
- Specified by:
sameStateAs
in interface HasState
equals
public boolean equals(java.lang.Object ob)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
Copyright (c) 2001, 2002, David Walend