org.databene.domain.address
Class PhoneNumberGenerator

java.lang.Object
  extended by org.databene.benerator.util.AbstractGenerator<E>
      extended by org.databene.benerator.util.ThreadSafeGenerator<PhoneNumber>
          extended by org.databene.domain.address.PhoneNumberGenerator
All Implemented Interfaces:
java.io.Closeable, Generator<PhoneNumber>, org.databene.commons.Resettable, org.databene.commons.ThreadAware

public class PhoneNumberGenerator
extends ThreadSafeGenerator<PhoneNumber>

Generates landline or mobile phone numbers in a given Country.

Created: 16.10.2009 05:33:57

Since:
0.6.0
Author:
Volker Bergmann

Field Summary
 
Fields inherited from class org.databene.benerator.util.AbstractGenerator
context, state
 
Constructor Summary
PhoneNumberGenerator(Country country)
           
 
Method Summary
 PhoneNumber generate()
          Returns an instance of the generic type E.
 java.lang.Class<PhoneNumber> getGeneratedType()
          Declares the type of the objects returned by the generate() method.
 void setCountry(Country country)
           
 
Methods inherited from class org.databene.benerator.util.ThreadSafeGenerator
isParallelizable, isThreadSafe
 
Methods inherited from class org.databene.benerator.util.AbstractGenerator
assertInitialized, assertNotInitialized, close, init, reset, toString, wasInitialized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PhoneNumberGenerator

public PhoneNumberGenerator(Country country)
Method Detail

setCountry

public void setCountry(Country country)

getGeneratedType

public java.lang.Class<PhoneNumber> getGeneratedType()
Description copied from interface: Generator
Declares the type of the objects returned by the generate() method.


generate

public PhoneNumber generate()
                     throws IllegalGeneratorStateException
Description copied from interface: Generator
Returns an instance of the generic type E.

Throws:
IllegalGeneratorStateException


Copyright © 2011. All Rights Reserved.