renderable
Class TextualFactoryBlock
java.lang.Object
renderable.TextualFactoryBlock
public class TextualFactoryBlock
- extends java.lang.Object
This private class acts as an IMMUTABLE ID tag for
factoryrenderableBlock. But it does more. It has a string
tag displayed through the toString method. This allows
us to add TextualFactoryBlock rather than String objects
into menu.JList. By overriding equals, we ensure that
AutoCompletePanel.menu when never have two equal items.
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
TextualFactoryBlock
public TextualFactoryBlock(FactoryRenderableBlock block,
java.lang.String rep)
- Creates a TextualFactoryBlock with the given block and string representation
- Parameters:
block
- the FactoryRenderableBlock tagged/represented by this TextualFactoryBlockrep
- the String "representation" to use for this TFB. Usually this would be the
block's label. To auto-generate a detailed rep, use the disambiguousStringRep() method.
getfactoryBlock
public FactoryRenderableBlock getfactoryBlock()
- Returns:
- FactoryBlock contained in this TextualFactoryBlock
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
- Returns:
- hashCode of this
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
compareTo
public int compareTo(TextualFactoryBlock b2)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object