Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.port80.util.attr
Class IntAttrFactory  view IntAttrFactory download IntAttrFactory.java

java.lang.Object
  extended bycom.port80.util.attr.IntAttrFactory
All Implemented Interfaces:
IAttrFactory

public class IntAttrFactory
extends java.lang.Object
implements IAttrFactory

Integer attribute factory.


Field Summary
private static IntAttrFactory instance
           
private static java.lang.String NAME
           
 
Constructor Summary
private IntAttrFactory()
           
 
Method Summary
static int create(java.lang.String stringvalue)
          Convenient static method to return correctly casted value.
 java.lang.Object createObject(java.lang.String attrvalue)
          Convert String representation of an attribute value to the appropriate object for storing in AttrTable.
static IntAttrFactory getInstance()
           
 boolean isValid(java.lang.Object a)
          Check that given object is valid value for this factory.
 java.lang.Object promptUser(java.lang.String prompt)
          Prompt user and present a user interface to obtain an attribute value from user.
 java.lang.String toString()
          The String representation of attribute type itself.
 java.lang.String toString(java.lang.Object attr)
          The String representation of an attribute value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME

private static final java.lang.String NAME
See Also:
Constant Field Values

instance

private static IntAttrFactory instance
Constructor Detail

IntAttrFactory

private IntAttrFactory()
Method Detail

getInstance

public static IntAttrFactory getInstance()

create

public static int create(java.lang.String stringvalue)
Convenient static method to return correctly casted value.


createObject

public java.lang.Object createObject(java.lang.String attrvalue)
Convert String representation of an attribute value to the appropriate object for storing in AttrTable.

Specified by:
createObject in interface IAttrFactory

isValid

public boolean isValid(java.lang.Object a)
Description copied from interface: IAttrFactory
Check that given object is valid value for this factory.

Specified by:
isValid in interface IAttrFactory

toString

public java.lang.String toString(java.lang.Object attr)
The String representation of an attribute value.

Specified by:
toString in interface IAttrFactory

toString

public java.lang.String toString()
The String representation of attribute type itself.

Specified by:
toString in interface IAttrFactory

promptUser

public java.lang.Object promptUser(java.lang.String prompt)
Prompt user and present a user interface to obtain an attribute value from user.

Specified by:
promptUser in interface IAttrFactory