All Superinterfaces:
Comparable<PackageBase>
All Known Implementing Classes:
Book, Electronic, PackageBase, Perishable

public interface Package extends Comparable<PackageBase>
Package interface that writes method declarations for a package object. Extends Comparable to allow Collections.sort(List) to be used on lists of PackageBase items.
  • Method Details

    • compareTo

      int compareTo(PackageBase p)
      For full method implementation see methods in PackageBase
      Specified by:
      compareTo in interface Comparable<PackageBase>
      Parameters:
      p - the object to be compared.
      Returns:
      An integer.
    • isDelivered

      boolean isDelivered()
      For full method implementation see methods in PackageBase
      Returns:
      A boolean that tells if a package is delivered or not.
    • setDeliveryStatus

      void setDeliveryStatus(boolean newStatus)
      For full method implementation see methods in PackageBase
      Parameters:
      newStatus - The new Status to be set for teh package's delivery status.
    • getExpectedDeliveryDate

      LocalDateTime getExpectedDeliveryDate()
      For full method implementation see methods in PackageBase
      Returns:
      Returns the expected delivery date of the package.
    • getName

      String getName()
      For full method implementation see methods in PackageBase
      Returns:
      Returns the name of the package.
    • getNotes

      String getNotes()
      For full method implementation see methods in PackageBase
      Returns:
      Returns the notes of the package.
    • getPrice

      double getPrice()
      For full method implementation see methods in PackageBase
      Returns:
      Returns the price of the package.
    • getWeight

      double getWeight()
      For full method implementation see methods in PackageBase
      Returns:
      Returns the weight of the package.