Class Entry

java.lang.Object
edu.uky.cs.nil.tt.Entry
All Implemented Interfaces:
Described, Named, Titled
Direct Known Subclasses:
Database.Listable

public class Entry extends Object implements Titled
An entry is a publicly available object that has a name, title, and description.
Author:
Stephen G. Ware
  • Constructor Details

    • Entry

      public Entry(String name, String title, String description)
      Constructs an entry from its name, title, and description.
      Parameters:
      name - the unique system name for this element, which is primarily used internally by the server
      title - a short natural language phrase for this element that will be displayed to users
      description - a short natural language statement explaining the details of this element that will be displayed to users
      Throws:
      NullPointerException - if the name is null
    • Entry

      public Entry(Titled titled)
      Constructs an entry using the meta-data of another object.
      Parameters:
      titled - the object whose name, title, and description will be copied
      Throws:
      NullPointerException - if the object's name is null
    • Entry

      public Entry(String name)
      Constructs an entry from only a name.
      Parameters:
      name - the unique system name for this element, which is primarily used internally by the server
  • Method Details

    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

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

      public final String getName()
      Description copied from interface: Named
      Returns this object's unique name that distinguishes it from other objects of the same type in the same context.
      Specified by:
      getName in interface Named
      Returns:
      the object's unique name
    • getTitle

      public String getTitle()
      Description copied from interface: Titled
      Returns a short human-readable natural language title for the object.
      Specified by:
      getTitle in interface Titled
      Returns:
      a short human-readable natural language title
    • setTitle

      public void setTitle(String title)
      Sets the title of this object.
      Parameters:
      title - a short natural language phrase for this element that will be displayed to users
    • getDescription

      public String getDescription()
      Description copied from interface: Described
      Returns a human-readable natural language description of the object.
      Specified by:
      getDescription in interface Described
      Returns:
      a human-readable natural language description of the object
    • setDescription

      public void setDescription(String description)
      Sets the description of this object.
      Parameters:
      description - a short natural language statement explaining the details of this element that will be displayed to users