Class LoremIpsum

  • All Implemented Interfaces:
    Lorem

    public class LoremIpsum
    extends java.lang.Object
    implements Lorem
    The MIT License (MIT) Copyright (c) 2015 Miguel De Anda Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    • Field Detail

      • words

        private java.util.List<java.lang.String> words
      • random

        private java.util.Random random
      • maleNames

        private java.util.List<java.lang.String> maleNames
      • femaleNames

        private java.util.List<java.lang.String> femaleNames
      • surnames

        private java.util.List<java.lang.String> surnames
      • firstNames

        private java.util.List<java.lang.String> firstNames
      • stateAbbr

        private java.util.List<java.lang.String> stateAbbr
      • stateFull

        private java.util.List<java.lang.String> stateFull
      • cities

        private java.util.List<java.lang.String> cities
      • countries

        private java.util.List<java.lang.String> countries
      • URL_HOSTS

        private java.lang.String[] URL_HOSTS
    • Constructor Detail

      • LoremIpsum

        public LoremIpsum()
      • LoremIpsum

        public LoremIpsum​(java.lang.Long seed)
    • Method Detail

      • getInstance

        public static LoremIpsum getInstance()
      • readLines

        private java.util.List<java.lang.String> readLines​(java.lang.String file)
      • getCity

        public java.lang.String getCity()
        Specified by:
        getCity in interface Lorem
      • getCountry

        public java.lang.String getCountry()
        Specified by:
        getCountry in interface Lorem
      • getEmail

        public java.lang.String getEmail()
        Specified by:
        getEmail in interface Lorem
      • getFirstName

        public java.lang.String getFirstName()
        Specified by:
        getFirstName in interface Lorem
      • getFirstNameMale

        public java.lang.String getFirstNameMale()
        Specified by:
        getFirstNameMale in interface Lorem
      • getFirstNameFemale

        public java.lang.String getFirstNameFemale()
        Specified by:
        getFirstNameFemale in interface Lorem
      • getLastName

        public java.lang.String getLastName()
        Specified by:
        getLastName in interface Lorem
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface Lorem
      • getNameMale

        public java.lang.String getNameMale()
        Specified by:
        getNameMale in interface Lorem
      • getNameFemale

        public java.lang.String getNameFemale()
        Specified by:
        getNameFemale in interface Lorem
      • getTitle

        public java.lang.String getTitle​(int count)
        Specified by:
        getTitle in interface Lorem
      • getTitle

        public java.lang.String getTitle​(int min,
                                         int max)
        Specified by:
        getTitle in interface Lorem
      • getCount

        private int getCount​(int min,
                             int max)
      • getHtmlParagraphs

        public java.lang.String getHtmlParagraphs​(int min,
                                                  int max)
        Specified by:
        getHtmlParagraphs in interface Lorem
      • getParagraphs

        public java.lang.String getParagraphs​(int min,
                                              int max)
        Specified by:
        getParagraphs in interface Lorem
      • getUrl

        public java.lang.String getUrl()
        Specified by:
        getUrl in interface Lorem
      • getWords

        private java.lang.String getWords​(int min,
                                          int max,
                                          boolean title)
      • getWords

        public java.lang.String getWords​(int count)
        Specified by:
        getWords in interface Lorem
      • getWords

        public java.lang.String getWords​(int min,
                                         int max)
        Specified by:
        getWords in interface Lorem
      • getWords

        private java.lang.String getWords​(int count,
                                          boolean title)
      • getRandom

        private java.lang.String getRandom​(java.util.List<java.lang.String> list)
      • getPhone

        public java.lang.String getPhone()
        Specified by:
        getPhone in interface Lorem
      • getStateAbbr

        public java.lang.String getStateAbbr()
        Specified by:
        getStateAbbr in interface Lorem
      • getStateFull

        public java.lang.String getStateFull()
        Specified by:
        getStateFull in interface Lorem
      • getZipCode

        public java.lang.String getZipCode()
        Specified by:
        getZipCode in interface Lorem