Class DefaultCustomerNameStrategy

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName​(java.lang.String firstName, java.lang.String lastName)
      Retrieves the name by combining firstname and lastname separated by a space character.
      java.lang.String[] splitName​(java.lang.String name)
      Retrieves first and lastname by splitting the given name at the last found space separator.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultCustomerNameStrategy

        public DefaultCustomerNameStrategy()
    • Method Detail

      • splitName

        public java.lang.String[] splitName​(java.lang.String name)
        Description copied from interface: CustomerNameStrategy
        Retrieves first and lastname by splitting the given name at the last found space separator.
        Specified by:
        splitName in interface CustomerNameStrategy
        Returns:
        array containing first- and lastname
      • getName

        public java.lang.String getName​(java.lang.String firstName,
                                        java.lang.String lastName)
        Description copied from interface: CustomerNameStrategy
        Retrieves the name by combining firstname and lastname separated by a space character.
        Specified by:
        getName in interface CustomerNameStrategy
        Returns:
        name