Class AbstractStyle

    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractStyle()  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static void castValue​(java.lang.Object o, java.lang.StringBuilder sb, java.lang.Character delimiter)
      Method to cast values of the components to string values for the hash calculation
      int compareTo​(AbstractStyle o)
      Method to compare two objects for sorting purpose
      abstract AbstractStyle copy()
      Abstract method to copy a component (dereferencing)
      (package private) <T extends AbstractStyle>
      void
      copyFields​(T source, T reference)
      Internal method to copy altered fields from a source object.
      boolean equals​(AbstractStyle other)
      Method to compare two objects for sorting purpose
      java.lang.Integer getInternalID()
      Gets the internal ID for sorting purpose in the Excel style document
      void setInternalID​(java.lang.Integer internalID)
      Sets the internal ID for sorting purpose in the Excel style document
      • Methods inherited from class java.lang.Object

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

      • AbstractStyle

        public AbstractStyle()
    • Method Detail

      • getInternalID

        public java.lang.Integer getInternalID()
        Gets the internal ID for sorting purpose in the Excel style document
        Returns:
        Internal ID (can be null for random order)
      • setInternalID

        public void setInternalID​(java.lang.Integer internalID)
        Sets the internal ID for sorting purpose in the Excel style document
        Parameters:
        internalID - Internal ID (can be null for random order)
      • copy

        public abstract AbstractStyle copy()
        Abstract method to copy a component (dereferencing)
        Returns:
        Returns a copied component
      • equals

        public boolean equals​(AbstractStyle other)
        Method to compare two objects for sorting purpose
        Parameters:
        other - Other object to compare with this object
        Returns:
        True if both objects are equal, otherwise false
      • compareTo

        public int compareTo​(AbstractStyle o)
        Method to compare two objects for sorting purpose
        Specified by:
        compareTo in interface java.lang.Comparable<AbstractStyle>
        Parameters:
        o - Other object to compare with this object
        Returns:
        -1 if the other object is bigger. 0 if both objects are equal. 1 if the other object is smaller.
      • castValue

        static void castValue​(java.lang.Object o,
                              java.lang.StringBuilder sb,
                              java.lang.Character delimiter)
        Method to cast values of the components to string values for the hash calculation
        Parameters:
        o - Value to cast
        sb - StringBuilder reference to put the casted object in
        delimiter - Delimiter character to append after the casted value
      • copyFields

        <T extends AbstractStyle> void copyFields​(T source,
                                                  T reference)
        Internal method to copy altered fields from a source object. The decision whether a field is copied is dependent on a untouched reference object
        Type Parameters:
        T - Reference object to decide whether the fields from the source objects are altered or not
        Parameters:
        source - Style or sub-class of Style that extends AbstractStyle
        reference - Source object with properties to copy