Class ColorSlug.Table

java.lang.Object
com.iizix.prop.ColorSlug.Table
Enclosing class:
ColorSlug

public static final class ColorSlug.Table extends Object
The slug table of one app block: every custom property name the block defines and what defines it, so that two definitions of one name are found rather than let the later one win.
Author:
Christopher Mindus
  • Constructor Details

    • Table

      public Table()
      Creates an empty table.
  • Method Details

    • claim

      public String claim(String slug, String owner)
      Claims a slug.
      Parameters:
      slug - The slug, without the prefix.
      owner - What defines it, for the message of a refusal: a reference or a role name.
      Returns:
      null when the slug was free and is now claimed by owner; otherwise the owner that claimed it first, which keeps it.
    • owner

      public String owner(String slug)
      Gets the owner of a slug.
      Parameters:
      slug - The slug.
      Returns:
      The owner, or null when the slug is free.
    • slugs

      public List<String> slugs()
      Gets the claimed slugs in claim order.
      Returns:
      The slugs, unmodifiable.