Class JRTemplateGenericElement

    • Constructor Detail

      • JRTemplateGenericElement

        public JRTemplateGenericElement​(JROrigin origin,
                                        JRDefaultStyleProvider defaultStyleProvider,
                                        JRGenericElementType genericType)
        Creates a generic print element template.
        Parameters:
        origin - the origin of the elements that will use the template
        defaultStyleProvider - the style provider to be used for the elements
        genericType - the type of the generic elements
      • JRTemplateGenericElement

        public JRTemplateGenericElement​(JROrigin origin,
                                        JRDefaultStyleProvider defaultStyleProvider,
                                        JRElement element,
                                        JRGenericElementType genericType)
        Creates a generic print element template.
        Parameters:
        origin - the origin of the elements that will use the template
        defaultStyleProvider - the style provider to be used for the elements
        element - an element to copy basic elements from
        genericType - the type of the generic elements
    • Method Detail

      • getGenericType

        public JRGenericElementType getGenericType()
        Returns the type of the generic elements that use this template.
        Returns:
        the type of the generic elements
      • setGenericType

        public void setGenericType​(JRGenericElementType genericType)
        Sets the type of the generic elements that use this template.
        Parameters:
        genericType - the generic type
      • getHashCode

        public int getHashCode()
        Description copied from interface: Deduplicable
        Returns a hash code to be used for the deduplicate map. The returned hash code should be consitent wiwh Deduplicable.isIdentical(Object), i.e. if two objects are identical they should have the same hash code.
        Returns:
        deduplication hash code
      • isIdentical

        public boolean isIdentical​(java.lang.Object object)
        Description copied from interface: Deduplicable
        Determines if this instance is identical to another object.
        Parameters:
        object - the object to compare with this instance
        Returns:
        true if the two objects are identical and can be deduplicated