Class GliderDBEntry

java.lang.Object
application.model.database.DatabaseEntry
application.model.database.GliderDBEntry

public class GliderDBEntry
extends DatabaseEntry
Represents an entry in the GliderDB database
  • Constructor Summary

    Constructors 
    Constructor Description
    GliderDBEntry​(Oscillator oscillator, java.lang.String discoverer, java.lang.String name)
    Constructs the database entry from an oscillator
    GliderDBEntry​(Spaceship spaceship, java.lang.String discoverer, java.lang.String name)
    Constructs the database entry from a spaceship
    GliderDBEntry​(java.lang.String entry)
    Constructs the database entry from a string
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getDiscoverer()
    Gets the discoverer of the spaceship
    java.lang.String getName()
    Gets the name of the spaceship
    Oscillator getOscillator()
    Gets the oscillator
    Spaceship getSpaceship()
    Gets the spaceship
    void setString​(java.lang.String entry)
    Sets the entry string
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • GliderDBEntry

      public GliderDBEntry​(java.lang.String entry)
      Constructs the database entry from a string
      Parameters:
      entry - The entry from the database
    • GliderDBEntry

      public GliderDBEntry​(Spaceship spaceship, java.lang.String discoverer, java.lang.String name)
      Constructs the database entry from a spaceship
      Parameters:
      spaceship - The spaceship
      discoverer - The discoverer of the spaceship
      name - The name of the spaceship
    • GliderDBEntry

      public GliderDBEntry​(Oscillator oscillator, java.lang.String discoverer, java.lang.String name)
      Constructs the database entry from an oscillator
      Parameters:
      oscillator - The oscillator
      discoverer - The discoverer of the oscillator
      name - The name of the oscillator
  • Method Details

    • getSpaceship

      public Spaceship getSpaceship()
      Gets the spaceship
      Returns:
      Returns the spaceship
    • getOscillator

      public Oscillator getOscillator()
      Gets the oscillator
      Returns:
      Returns the oscillator
    • getName

      public java.lang.String getName()
      Gets the name of the spaceship
      Returns:
      Returns the name of the spaceship
    • getDiscoverer

      public java.lang.String getDiscoverer()
      Gets the discoverer of the spaceship
      Returns:
      Returns the discoverer of the spaceship
    • setString

      public void setString​(java.lang.String entry)
      Sets the entry string
      Parameters:
      entry - The entry string
    • toString

      public java.lang.String toString()
      Specified by:
      toString in class DatabaseEntry