Skip to content

Commit

Permalink
complete some documents
Browse files Browse the repository at this point in the history
  • Loading branch information
lhfcws committed Apr 10, 2017
1 parent 7a953b2 commit 291c793
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/main/java/io/codearte/jfairy/Fairy.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public Person person(PersonProperties.PersonProperty... personProperties) {
/**
* Use this method to generate fake company
*
* @param companyProperties desired company features
* @return A {@link io.codearte.jfairy.producer.company.CompanyProvider} instance
*/
public Company company(CompanyProperties.CompanyProperty... companyProperties) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void generateName() {

/**
* In case of the illegal hostname characters in company name
* and truncate it if it is too long (length > 10) after escape
* and truncate it if it is too long (length > 10) after escape
*
* It is compatible with other non-latin language and will not change the original result for latin language.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public String ipAddress() {
* Add a simple url generator
* Example: networkProducer.url(baseProducer.trueOrFalse())
*
* @return
* @param isHttps is https or not
* @return A faked url.
*/
public String url(boolean isHttps) {
String mergedIP = ipAddress().replaceAll("\\.", "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ private ZhFairyUtil() {}

/**
* Get random number from 1 to max in 0 leading string format.
* @param baseProducer BaseProducer
* @param max upper bound of number
* @param paddingSize padding size
* @return
* @return A number smaller than #max with #paddingSize digits in string format
*/
public static String getRandomNumStr(BaseProducer baseProducer, int max, int paddingSize) {
int rndNum = baseProducer.randomBetween(1, max);
Expand Down

0 comments on commit 291c793

Please sign in to comment.