Class GeneralNoun

java.lang.Object
org.skriptlang.skript.localization.GeneralNoun

public class GeneralNoun extends Object
A Noun-like class, non-dependent of Language. Discerns the gender, single, and plurality of a string.
  • Constructor Details

    • GeneralNoun

      public GeneralNoun(String original)
  • Method Details

    • getGender

      public int getGender()
      Gets the gender.
      Returns:
      The gender.
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toString

      public String toString(boolean plural)
      Gets the single or plural version of this noun.
      Parameters:
      plural - Whether to get plural version.
      Returns:
      The noun.
    • toString

      public String toString(int flags)
      Gets this noun appended with an article.
      Parameters:
      flags - The flags for determining plurality.
      Returns:
      The noun.
    • toString

      public String toString(GeneralNoun other, int flags)
      Gets this noun appended with article and other.
      Parameters:
      other - The other GeneralNoun to append to the string.
      flags - The flags for determining plurality.
      Returns:
      The noun.
    • getArticleWithSpace

      public String getArticleWithSpace(int flags)
      Returns the article appropriate for this gender invalid input: '&' the provided flags.
      Parameters:
      flags - The flags for determining plurality.
      Returns:
      The article with a trailing space (as no article is possible in which case the empty string is returned)
      See Also: