Packages

object UsStates

Reference data for the 50 US states, used to make STATE obfuscation format aware.

A STATE chunk can reach the obfuscator either spelled out ("New York") or abbreviated ("NY"). The fake pools are kept in two resources that mirror each other:

  • /faker/location/state/en.txt holds the spelled out names
  • /faker/location/state/abbreviation_en.txt holds the two letter abbreviations

This object only provides the lookups needed to decide which pool to use and to convert between the two formats. The conversion is required by the geographic consistency path because Addresses.state is always stored as a two letter abbreviation.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. UsStates
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def isAbbreviationFormat(value: String): Boolean

    Whether the value looks like a two letter state abbreviation, for example "NY", "ny" or " Oh ".

    Whether the value looks like a two letter state abbreviation, for example "NY", "ny" or " Oh ".

    The check is deliberately format based rather than membership based: a two letter STATE chunk must be replaced by a two letter fake even when it is not one of the 50 official abbreviations, otherwise the obfuscated output would leak the fact that the original was not a real state.

  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. def matches(abbreviation: String, value: String): Boolean

    Whether value refers to the state identified by abbreviation, in either format.

    Whether value refers to the state identified by abbreviation, in either format.

    Used to match a STATE chunk against Addresses.state, which is always abbreviated, so that both "NY" and "New York" match the address whose state is "NY".

  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  18. def toAbbreviation(name: String): Option[String]

    The abbreviation for a spelled out state name, when the name is a known US state.

  19. def toFullName(abbreviation: String): Option[String]

    The spelled out name for an abbreviation, when the abbreviation is a known US state.

  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped