Class NameBuilder

java.lang.Object
games.stendhal.common.NameBuilder

public class NameBuilder extends Object
NameBuilder to build a name separated by spaces.
Author:
Martin Fuchs
  • Constructor Details

    • NameBuilder

      public NameBuilder()
      Name Builder
    • NameBuilder

      public NameBuilder(String sep)
      Name Builder
      Parameters:
      sep - separator character
  • Method Details

    • append

      public void append(String str)
      Append a string, separate by space if not empty.
      Parameters:
      str - string to add
    • isEmpty

      public boolean isEmpty()
      Return true if still empty.
      Returns:
      empty flag
    • toString

      public String toString()
      Overrides:
      toString in class Object