Class SailUtil


  • public class SailUtil
    extends java.lang.Object
    Defines utility methods for working with Sails.
    • Constructor Summary

      Constructors 
      Constructor Description
      SailUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <C extends Sail>
      C
      findSailInStack​(Sail topSail, java.lang.Class<C> sailClass)
      Searches a stack of Sails from top to bottom for a Sail that is an instance of the suppied class or interface.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SailUtil

        public SailUtil()
    • Method Detail

      • findSailInStack

        public static <C extends Sail> C findSailInStack​(Sail topSail,
                                                         java.lang.Class<C> sailClass)
        Searches a stack of Sails from top to bottom for a Sail that is an instance of the suppied class or interface. The first Sail that matches (i.e. the one closest to the top) is returned.
        Parameters:
        topSail - The top of the Sail stack.
        sailClass - A class or interface.
        Returns:
        A Sail that is an instance of sailClass, or null if no such Sail was found.