Package application.model.database
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 oscillatorGliderDBEntry(Spaceship spaceship, java.lang.String discoverer, java.lang.String name)
Constructs the database entry from a spaceshipGliderDBEntry(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 spaceshipjava.lang.String
getName()
Gets the name of the spaceshipOscillator
getOscillator()
Gets the oscillatorSpaceship
getSpaceship()
Gets the spaceshipvoid
setString(java.lang.String entry)
Sets the entry stringjava.lang.String
toString()
-
Constructor Details
-
GliderDBEntry
public GliderDBEntry(java.lang.String entry)Constructs the database entry from a string- Parameters:
entry
- The entry from the database
-
GliderDBEntry
Constructs the database entry from a spaceship- Parameters:
spaceship
- The spaceshipdiscoverer
- The discoverer of the spaceshipname
- The name of the spaceship
-
GliderDBEntry
Constructs the database entry from an oscillator- Parameters:
oscillator
- The oscillatordiscoverer
- The discoverer of the oscillatorname
- The name of the oscillator
-
-
Method Details
-
getSpaceship
Gets the spaceship- Returns:
- Returns the spaceship
-
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 classDatabaseEntry
-