Skip to content

Commit

Permalink
Added support for adjectives, adverbs, conjunctions, interjections, n…
Browse files Browse the repository at this point in the history
  • Loading branch information
bodiam committed Aug 5, 2024
1 parent 9cfcfdf commit ec921c9
Show file tree
Hide file tree
Showing 5 changed files with 3,612 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/net/datafaker/providers/base/BaseProviders.java
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,10 @@ default Weather weather() {
return getProvider(Weather.class, Weather::new);
}

default Word word() {
return getProvider(Word.class, Word::new);
}

default Yoda yoda() {
return getProvider(Yoda.class, Yoda::new);
}
Expand Down
43 changes: 43 additions & 0 deletions src/main/java/net/datafaker/providers/base/Word.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package net.datafaker.providers.base;

import net.datafaker.Faker;

/**
* Since 2.4.0
*/
public class Word extends AbstractProvider<BaseProviders> {

protected Word(BaseProviders faker) {
super(faker);
}

public String adjective() {
return resolve("words.adjective");
}

public String adverb() {
return resolve("words.adverb");
}

public String conjunction() {
return resolve("words.conjunction");
}

public String interjection() {
return resolve("words.interjection");
}

public String noun() {
return resolve("words.noun");
}

public String preposition() {
return resolve("words.preposition");
}

public String verb() {
return resolve("words.verb");
}


}
1 change: 1 addition & 0 deletions src/main/java/net/datafaker/service/files/EnFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ public String getPath() {
"the_venture_bros.yml",
"verbs.yml",
"weather.yml",
"words.yml",
"witcher.yml",
"kaamelott.yml",
"touhou.yml",
Expand Down
Loading

0 comments on commit ec921c9

Please sign in to comment.