signature:
public class BorderTop { /** * checks the given css value is valid for this class . It does ' t do a strict
 * validation .
 * @ param cssValue
 * @ return
 * @ since 1.0.0
 * @ author WFF */
public static boolean isValid ( final String cssValue ) { } }

implementation:
// TODO modify to make a strict validation
if ( cssValue == null || StringUtil . isBlank ( cssValue ) ) { return false ; } final List < String > cssValueParts = CssValueUtil . split ( cssValue ) ; BorderTopWidth borderTopWidth = null ; BorderTopStyle borderTopStyle = null ; BorderTopColor borderTopColor = null ; for ( final String eachPart : cssValueParts ) { boolean invalid = true ; if ( borderTopWidth == null && BorderTopWidth . isValid ( eachPart ) ) { borderTopWidth = new BorderTopWidth ( eachPart ) ; invalid = false ; } else if ( borderTopStyle == null && BorderTopStyle . isValid ( eachPart ) ) { borderTopStyle = BorderTopStyle . getThis ( eachPart ) ; invalid = false ; } else if ( borderTopColor == null && BorderTopColor . isValid ( eachPart ) ) { borderTopColor = new BorderTopColor ( eachPart ) ; invalid = false ; } if ( invalid ) { return false ; } } return borderTopWidth != null || borderTopStyle != null || borderTopColor != null ;


signature:
public class CloneUtil { /** * clones only if { @ code objects } contains the given
 * { @ code objectToBeClonned } , otherwise returns the same object .
 * @ param objectToBeClonned
 * from which a new object will be cloned .
 * { @ code null } will be returned for null
 * value .
 * @ param objects
 * to check if it contains
 * { @ code objectToBeClonned } .
 * @ return the new cloned object only if { @ code objects } contains the given
 * { @ code objectToBeClonned } , otherwise returns the same object . If
 * { @ code objectToBeClonned } is null then returns { @ code null } . If
 * { @ code objects } is null then { @ code objectToBeClonned } will be
 * returned .
 * @ throws CloneNotSupportedException
 * @ since 1.0.0
 * @ author WFF */
public static < T > T deepCloneOnlyIfContains ( final T objectToBeClonned , final T [ ] objects ) throws CloneNotSupportedException { } }

implementation: if ( objectToBeClonned == null || objects == null ) { return objectToBeClonned ; } final Set < T > objectsSet = new HashSet < > ( objects . length ) ; Collections . addAll ( objectsSet , objects ) ; return objectsSet . contains ( objectToBeClonned ) ? deepClone ( objectToBeClonned ) : objectToBeClonned ;


signature:
public class CloneUtil { /** * clones only if { @ code objects } contains the given
 * { @ code objectToBeClonned } , otherwise returns the same object .
 * @ param objectToBeClonned
 * from which a new object will be cloned .
 * { @ code null } will be returned for null
 * value .
 * @ param objects
 * to check if it contains
 * { @ code objectToBeClonned } .
 * @ return the new cloned object only if { @ code objects } contains the given
 * { @ code objectToBeClonned } , otherwise returns the same object . If
 * { @ code objectToBeClonned } is null then returns { @ code null } . If
 * { @ code objects } is null then { @ code objectToBeClonned } will be
 * returned .
 * @ throws CloneNotSupportedException
 * @ since 1.0.0
 * @ author WFF */
public static < T > T deepCloneOnlyIfContains ( final T objectToBeClonned , final List < T > objects ) throws CloneNotSupportedException { } }

implementation: if ( objectToBeClonned == null || objects == null ) { return objectToBeClonned ; } final Set < T > objectsSet = new HashSet < > ( objects ) ; return objectsSet . contains ( objectToBeClonned ) ? deepClone ( objectToBeClonned ) : objectToBeClonned ;


signature:
public class CloneUtil { /** * clones only if { @ code objects } contains the given
 * { @ code objectToBeClonned } , otherwise returns the same object .
 * @ param objectToBeClonned
 * from which a new object will be cloned .
 * { @ code null } will be returned for null
 * value .
 * @ param objects
 * to check if it contains
 * { @ code objectToBeClonned } .
 * @ return the new cloned object only if { @ code objects } contains the given
 * { @ code objectToBeClonned } , otherwise returns the same object . If
 * { @ code objectToBeClonned } is null then returns { @ code null } . If
 * { @ code objects } is null then { @ code objectToBeClonned } will be
 * returned .
 * @ throws CloneNotSupportedException
 * @ since 1.0.0
 * @ author WFF */
public static < T > T deepCloneOnlyIfContains ( final T objectToBeClonned , final Set < T > objects ) throws CloneNotSupportedException { } }

implementation: if ( objectToBeClonned == null || objects == null ) { return objectToBeClonned ; } return objects . contains ( objectToBeClonned ) ? deepClone ( objectToBeClonned ) : objectToBeClonned ;


signature:
public class Style { /** * removes the support for the class from { @ code Style class } or its
 * extended class .
 * @ param cssClass
 * @ since 1.0.0
 * @ author WFF */
public static void removeSupportOfCssClass ( final Class < ? > cssClass ) { } }

implementation: if ( cssClass != null ) { for ( final Entry < String , Class < ? > > entry : CSSPROPERTY_CLASSES . entrySet ( ) ) { if ( entry . getValue ( ) == cssClass ) { CSSPROPERTY_CLASSES . remove ( entry . getKey ( ) ) ; break ; } } }


signature:
public class Style { /** * removes the support for the classes from { @ code Style class } or its
 * extended class .
 * @ param cssClasses
 * @ since 1.0.0
 * @ author WFF */
public static void removeSupportOfCssClasses ( final Class < ? > ... cssClasses ) { } }

implementation: for ( final Class < ? > cssClass : cssClasses ) { if ( cssClass != null ) { removeSupportOfCssClass ( cssClass ) ; } }


signature:
public class Style { /** * @ param cssProperties
 * styles separated by semicolon . < br >
 * eg : - { @ code color : blue ; text - align : center }
 * @ since 1.0.0
 * @ author WFF */
public void addCssProperties ( final String cssProperties ) { } }

implementation: final long stamp = lock . writeLock ( ) ; try { extractStylesAndAddToAttributeValueMap ( cssProperties ) ; } finally { lock . unlockWrite ( stamp ) ; }


signature:
public class Style { /** * eg : { @ code addCssProperty ( " color " , " green " ) }
 * @ param cssName
 * eg : color
 * @ param cssValue
 * eg : green ( for color styleName )
 * @ since 1.0.0
 * @ author WFF
 * @ return true if the cssName and cssValue has been added or modified . If
 * it contains same style name and value then it will return false . */
public boolean addCssProperty ( final String cssName , final String cssValue ) { } }

implementation:
final long stamp = lock . writeLock ( ) ; try { if ( cssName == null ) { throw new NullValueException ( "styleName cannot be null" ) ; } final String strippedCssName = StringUtil . strip ( cssName ) ; if ( StringUtil . endsWithColon ( strippedCssName ) ) { throw new InvalidValueException ( "cssName can not end with : (colon)" ) ; } if ( cssValue == null ) { throw new NullValueException ( "cssValue cannot be null" ) ; } final String trimmedCssValue = StringUtil . strip ( cssValue ) ; if ( trimmedCssValue . length ( ) > 0 && ( trimmedCssValue . charAt ( 0 ) == ':' || trimmedCssValue . charAt ( trimmedCssValue . length ( ) - 1 ) == ';' ) ) { throw new InvalidValueException ( "value can not start with : (colon) or end with ; (semicolon)" ) ; } final boolean addToAttributeValueMap = super . addToAttributeValueMap ( strippedCssName , cssValue ) ; if ( addToAttributeValueMap ) { // to save the corresponding
// object to abstractCssPropertyClassObjects
getCssPropertyLockless ( strippedCssName ) ; } return addToAttributeValueMap ; } finally { lock . unlockWrite ( stamp ) ; }


signature:
public class Style { /** * adds each cssProperty from the given collection . < br >
 * NB : - After using this method , adding or removing any value in the
 * collection will not have any effect on { @ code Style } , so this method may
 * be removed later .
 * @ param cssProperties
 * eg : -
 * { @ code addStyles ( Arrays . asList ( AlignContent . FLEX _ END , AlignItems . FLEX _ END ) ) }
 * @ since 1.0.0
 * @ author WFF
 * @ return the added { @ code CssProperty } objects as a
 * { @ code List < CssProperty > } .
 * @ deprecated After using this method , adding or removing any value in the
 * collection will not have any effect on { @ code Style } , so this
 * method may be removed later . */
@ Deprecated public List < CssProperty > addCssProperties ( final Collection < ? extends CssProperty > cssProperties ) { } }

implementation: if ( cssProperties == null ) { throw new NullValueException ( "cssProperties cannot be null" ) ; } final long stamp = lock . writeLock ( ) ; try { return addCssPropertiesLockless ( false , cssProperties . toArray ( new CssProperty [ cssProperties . size ( ) ] ) ) ; } finally { lock . unlockWrite ( stamp ) ; }


signature:
public class Style { /** * removes only if it contains the given style name and value .
 * @ param cssName
 * eg : color
 * @ param cssValue
 * eg : green ( for color styleName )
 * @ since 1.0.0
 * @ return true if the given syleName ( as well as value contained
 * corresponding to it ) has been removed , or false if it doesn ' t
 * contain the given styleName and value .
 * @ author WFF */
public boolean removeCssProperty ( final String cssName , final String cssValue ) { } }

implementation: final long stamp = lock . writeLock ( ) ; try { final boolean removed = removeCssPropertyNotFromSuperLockless ( cssName , cssValue ) ; if ( removed ) { super . removeFromAttributeValueMap ( cssName ) ; } return removed ; } finally { lock . unlockWrite ( stamp ) ; }


signature:
public class Style { /** * removes only if it contains the given style name and value .
 * @ param cssName
 * eg : color
 * @ param cssValue
 * eg : green ( for color styleName )
 * @ since 1.0.0
 * @ return true if the given syleName ( as well as value contained
 * corresponding to it ) has been removed , or false if it doesn ' t
 * contain the given styleName and value .
 * @ author WFF */
private boolean removeCssPropertyNotFromSuperLockless ( final String cssName , final String cssValue ) { } }

implementation:
final String strippedCssName = StringUtil . strip ( cssName ) ; final String strippedCssValue = StringUtil . strip ( cssValue ) ; final String value = super . getAttributeValueMap ( ) . get ( strippedCssName ) ; // the value may contain ! important that ' s why startsWith method is used
// here .
if ( value != null && value . startsWith ( strippedCssValue . toLowerCase ( ) . replace ( IMPORTANT , "" ) ) ) { return removeCssPropertyNotFromSuperLockless ( strippedCssName ) ; } return false ;


signature:
public class Style { /** * removes the style .
 * @ param cssProperty
 * @ since 1.0.0
 * @ return true if the given syleName ( as well as value contained
 * corresponding to it ) has been removed , or false if it doesn ' t
 * contain the given styleName and value .
 * @ author WFF */
public boolean removeCssProperty ( final CssProperty cssProperty ) { } }

implementation: final long stamp = lock . writeLock ( ) ; try { final boolean removed = removeCssPropertyNotFromSuperLockless ( cssProperty ) ; if ( removed ) { return super . removeFromAttributeValueMap ( cssProperty . getCssName ( ) ) ; } return removed ; } finally { lock . unlockWrite ( stamp ) ; }


signature:
public class Style { /** * removes the style .
 * @ param cssProperty
 * @ since 1.0.0
 * @ return true if the given syleName ( as well as value contained
 * corresponding to it ) has been removed , or false if it doesn ' t
 * contain the given styleName and value .
 * @ author WFF */
private boolean removeCssPropertyNotFromSuperLockless ( final CssProperty cssProperty ) { } }

implementation: final AbstractCssProperty < ? > abstractCssProperty = abstractCssPropertyClassObjects . get ( cssProperty . getCssName ( ) ) ; if ( abstractCssProperty != null && ! Objects . equals ( abstractCssProperty , cssProperty ) ) { LOGGER . warning ( "The added CssProperty object is different. Use the same object which was used to add the style." ) ; return false ; } cssProperties . remove ( cssProperty ) ; final String cssName = cssProperty . getCssName ( ) ; final boolean removed = removeCssPropertyNotFromSuperLockless ( cssName , cssProperty . getCssValue ( ) ) ; return removed ;


signature:
public class Style { /** * Removes all css properties
 * @ since 3.0.1 */
public void removeAllCssProperties ( ) { } }

implementation: final long stamp = lock . writeLock ( ) ; try { cssProperties . clear ( ) ; abstractCssPropertyClassObjects . clear ( ) ; super . removeAllFromAttributeValueMap ( ) ; } finally { lock . unlockWrite ( stamp ) ; }


signature:
public class Style { /** * Checks if the given cssProperty object exists in this style object .
 * @ return
 * @ since 3.0.1 */
public boolean contains ( final CssProperty cssProperty ) { } }

implementation: final long stamp = lock . readLock ( ) ; try { return cssProperties . contains ( cssProperty ) ; } finally { lock . unlockRead ( stamp ) ; }


signature:
public class Style { /** * NB : - After using this method , adding or removing any value in the
 * collection will not have any effect on { @ code Style } , so this method may
 * be removed later .
 * @ param cssProperties
 * @ return the { @ code List < Boolean > } of status whether the corresponding
 * object has been removed .
 * @ since 1.0.0
 * @ author WFF
 * @ deprecated After using this method , adding or removing any value in the
 * collection will not have any effect on { @ code Style } , so this
 * method may be removed later . */
@ Deprecated public List < Boolean > removeCssProperties ( final Collection < CssProperty > cssProperties ) { } }

implementation: final long stamp = lock . writeLock ( ) ; try { final String [ ] cssNamesToRemove = new String [ cssProperties . size ( ) ] ; final List < Boolean > removedStatus = new ArrayList < > ( cssNamesToRemove . length ) ; int index = 0 ; for ( final CssProperty cssProperty : cssProperties ) { removedStatus . add ( removeCssPropertyNotFromSuperLockless ( cssProperty ) ) ; cssNamesToRemove [ index ] = cssProperty . getCssName ( ) ; index ++ ; } super . removeFromAttributeValueMapByKeys ( cssNamesToRemove ) ; return removedStatus ; } finally { lock . unlockWrite ( stamp ) ; }


signature:
public class Style { /** * marks as important . i . e . it will add { @ code ! important } from the
 * corresponding styleName value
 * @ param styleName
 * @ return true if it ' s marked as important or false if it already marked as
 * important
 * @ since 1.0.0
 * @ author WFF */
public boolean markAsImportant ( final String styleName ) { } }

implementation: if ( styleName == null ) { return false ; } final long stamp = lock . writeLock ( ) ; try { final String trimmedStyleName = StringUtil . strip ( styleName ) ; final String value = super . getAttributeValueMap ( ) . get ( trimmedStyleName ) ; if ( value != null && ! value . isEmpty ( ) ) { return super . addToAttributeValueMap ( trimmedStyleName , value + " " + IMPORTANT ) ; } return false ; } finally { lock . unlockWrite ( stamp ) ; }


signature:
public class Style { /** * gets the { @ code Collection < CssProperty > } . It ' s unmodifiable set since
 * 3.0.1.
 * @ return { @ code Collection < CssProperty > }
 * @ since 1.0.0
 * @ author WFF */
public Collection < CssProperty > getCssProperties ( ) { } }

implementation: final long stamp = lock . readLock ( ) ; try { return Collections . unmodifiableSet ( cssProperties ) ; } finally { lock . unlockRead ( stamp ) ; }


signature:
public class CssTimeUtil { /** * gets the time value and unit as an array . For a cssValue
 * < code > 555ms < / code > , the returned array may be used as
 * < pre >
 * Object [ ] timeValueAsPremitiveAndUnit = CssTimeUtil
 * . getTimeValueAsPremitiveAndUnit ( & quot ; 555ms & quot ; ) ;
 * float value = ( float ) timeValueAsPremitiveAndUnit [ 0 ] ;
 * / / the object will be equal to CssTimeUnit . MS
 * CssTimeUnit unit = ( CssTimeUnit ) timeValueAsPremitiveAndUnit [ 1 ] ;
 * < / pre >
 * @ param cssValue
 * the value from which the time value and unit required
 * to be parsed , Eg : - < code > 555ms < / code > .
 * @ return an array containing time and unit . The time will be in the zeroth
 * index as { @ code float } ( primitive type ) type and its unit in the
 * first index as an object of { @ code CssTimeUnit } . If the given
 * cssValue is not a combination of time value and unit then an
 * empty array ( having time zero ) will be returned . It will never
 * return null .
 * @ author WFF
 * @ since 1.0.0 */
public static Object [ ] getTimeValueAsPremitiveAndUnit ( final String cssValue ) { } }

implementation: for ( final CssTimeUnit cssTimeUnit : CssTimeUnit . values ( ) ) { final String unit = cssTimeUnit . getUnit ( ) ; if ( cssValue . endsWith ( unit ) ) { final String valueOnly = cssValue . replaceFirst ( unit , "" ) ; try { return new Object [ ] { Float . parseFloat ( valueOnly ) , cssTimeUnit } ; } catch ( final NumberFormatException e ) { return new Object [ 0 ] ; } } } return new Object [ 0 ] ;


signature:
public class CssTimeUtil { /** * gets the time value and unit as an array . For a cssValue
 * < code > 555ms < / code > , the returned array may be used as
 * < pre >
 * Object [ ] timeValueAndUnit = CssTimeUtil . getTimeValueAndUnit ( & quot ; 555ms & quot ; ) ;
 * Float value = ( Float ) timeValueAndUnit [ 0 ] ;
 * / / the object will be equal to CssTimeUnit . MS
 * CssTimeUnit unit = ( CssTimeUnit ) timeValueAndUnit [ 1 ] ;
 * < / pre >
 * @ param cssValue
 * the value from which the time value and unit required
 * to be parsed , Eg : - < code > 555ms < / code > .
 * @ return an array containing time and unit . The time will be in the zeroth
 * index as { @ code Float } ( wrapper type ) type and its unit in the
 * first index as an object of { @ code CssTimeUnit } . If the given
 * cssValue is not a combination of time value and unit then an
 * empty array ( having time zero ) will be returned . It will never
 * return null .
 * @ author WFF
 * @ since 1.0.0 */
public static Object [ ] getTimeValueAndUnit ( final String cssValue ) { } }

implementation: for ( final CssTimeUnit cssTimeUnit : CssTimeUnit . values ( ) ) { final String unit = cssTimeUnit . getUnit ( ) ; if ( cssValue . endsWith ( unit ) ) { final String valueOnly = cssValue . replaceFirst ( unit , "" ) ; try { return new Object [ ] { Float . valueOf ( valueOnly ) , cssTimeUnit } ; } catch ( final NumberFormatException e ) { return new Object [ 0 ] ; } } } return new Object [ 0 ] ;


signature:
public class CssLengthUtil { /** * gets the length value and unit as an array . For a cssValue
 * < code > 555px < / code > , the returned array may be used as
 * < pre >
 * Object [ ] lengthValueAsPremitiveAndUnit = CssLengthUtil
 * . getLengthValueAsPremitiveAndUnit ( & quot ; 555px & quot ; ) ;
 * float value = ( float ) lengthValueAsPremitiveAndUnit [ 0 ] ;
 * / / the object will be equal to CssLengthUnit . PX
 * CssLengthUnit unit = ( CssLengthUnit ) lengthValueAsPremitiveAndUnit [ 1 ] ;
 * Auto - boxing is done when the primitive value is stored in an object array
 * therefore there is no much advantage with this method .
 * [ This method is left for future modification . ]
 * < / pre >
 * @ param cssValue
 * the value from which the length value and unit
 * required to be parsed , Eg : - < code > 555px < / code > .
 * @ return an array containing length and unit . The length will be in the
 * zeroth index as { @ code float } ( primitive type ) type and its unit
 * in the first index as an object of { @ code CssLengthUnit } . If the
 * given cssValue doesn ' t contain unit but contains value then an
 * array containing only length value ( i . e . array having length one )
 * will be returned . For any invalid value it will return an empty
 * array ( having length zero ) , specifically it will never return
 * null .
 * @ author WFF
 * @ since 1.0.0 */
public static Object [ ] getLengthValueAsPremitiveAndUnit ( final String cssValue ) { } }

implementation:
final String trimmedCssValue = StringUtil . strip ( cssValue ) ; final char [ ] cssValueChars = trimmedCssValue . toCharArray ( ) ; int lengthSeparationIndex = - 1 ; for ( int i = cssValueChars . length - 1 ; i > - 1 ; i -- ) { final char c = cssValueChars [ i ] ; if ( ! ( c < '0' || c > '9' ) ) { // is a number
lengthSeparationIndex = i ; break ; } } final String value = StringUtil . strip ( trimmedCssValue . substring ( 0 , lengthSeparationIndex + 1 ) ) ; try { if ( lengthSeparationIndex == ( cssValueChars . length - 1 ) ) { return new Object [ ] { Float . parseFloat ( value ) } ; } String unit = StringUtil . strip ( trimmedCssValue . substring ( lengthSeparationIndex + 1 ) ) ; if ( unit . length ( ) == 1 && unit . charAt ( 0 ) == '%' ) { return new Object [ ] { Float . parseFloat ( value ) , CssLengthUnit . PER } ; } else { unit = unit . toUpperCase ( ) ; } return new Object [ ] { Float . parseFloat ( value ) , CssLengthUnit . valueOf ( unit ) } ; } catch ( final IllegalArgumentException e ) { // there will be IllegalArgumentException if the CssLengthUtil is
// invalid
// there will be NumberFormatException if the value is invalid
// if the given css value is invalid it should return an array with
// length zero
return new Object [ 0 ] ; }


signature:
public class BorderWidth { /** * sets the top , right , bottom and left width in { @ code BorderWidth } . If the
 * given argument is already used by another object , then the
 * existing / cloned object will be used . And throws
 * { @ code NullValueException } if any of the given argument is null .
 * @ param borderTopWidth
 * @ param borderRightWidth
 * @ param borderBottomWidth
 * @ param borderLeftWidth
 * @ author WFF
 * @ since 1.0.0 */
public void setBorderWidth ( final BorderTopWidth borderTopWidth , final BorderRightWidth borderRightWidth , final BorderBottomWidth borderBottomWidth , final BorderLeftWidth borderLeftWidth ) { } }

implementation: if ( borderTopWidth != null && borderRightWidth != null && borderBottomWidth != null && borderLeftWidth != null ) { if ( BorderTopWidth . INITIAL . equals ( borderTopWidth . getCssValue ( ) ) || BorderTopWidth . INHERIT . equals ( borderTopWidth . getCssValue ( ) ) || BorderRightWidth . INITIAL . equals ( borderRightWidth . getCssValue ( ) ) || BorderRightWidth . INHERIT . equals ( borderRightWidth . getCssValue ( ) ) || BorderBottomWidth . INITIAL . equals ( borderBottomWidth . getCssValue ( ) ) || BorderBottomWidth . INHERIT . equals ( borderBottomWidth . getCssValue ( ) ) || BorderLeftWidth . INITIAL . equals ( borderLeftWidth . getCssValue ( ) ) || BorderLeftWidth . INHERIT . equals ( borderLeftWidth . getCssValue ( ) ) ) { throw new InvalidValueException ( "Any or all of the given arguments have initial/inherit constant value as its cssValue" ) ; } try { final BorderTopWidth borderTopWidthTemp ; final BorderRightWidth borderRightWidthTemp ; final BorderBottomWidth borderBottomWidthTemp ; final BorderLeftWidth borderLeftWidthTemp ; if ( this . borderTopWidth != null ) { this . borderTopWidth . setAlreadyInUse ( false ) ; this . borderRightWidth . setAlreadyInUse ( false ) ; this . borderBottomWidth . setAlreadyInUse ( false ) ; this . borderLeftWidth . setAlreadyInUse ( false ) ; } if ( borderTopWidth . isAlreadyInUse ( ) && this . borderTopWidth != borderTopWidth ) { if ( this . borderTopWidth != null ) { borderTopWidthTemp = this . borderTopWidth . setCssValue ( borderTopWidth . getCssValue ( ) ) ; if ( LOGGER . isLoggable ( Level . WARNING ) ) { LOGGER . warning ( "the given borderTopWidth is already used by another object so the existing object is used" ) ; } } else { borderTopWidthTemp = borderTopWidth . clone ( ) ; if ( LOGGER . isLoggable ( Level . WARNING ) ) { LOGGER . warning ( "the given borderTopWidth is already used by another object so its clone is assigned" ) ; } } } else { borderTopWidthTemp = borderTopWidth ; } if ( borderRightWidth . isAlreadyInUse ( ) && this . borderRightWidth != borderRightWidth ) { if ( this . borderRightWidth != null ) { borderRightWidthTemp = this . borderRightWidth . setCssValue ( borderTopWidth . getCssValue ( ) ) ; if ( LOGGER . isLoggable ( Level . WARNING ) ) { LOGGER . warning ( "the given borderRightWidth is already used by another object so the existing object is used" ) ; } } else { borderRightWidthTemp = borderRightWidth . clone ( ) ; if ( LOGGER . isLoggable ( Level . WARNING ) ) { LOGGER . warning ( "the given borderRightWidth is already used by another object so its clone is assigned" ) ; } } } else { borderRightWidthTemp = borderRightWidth ; } if ( borderBottomWidth . isAlreadyInUse ( ) && this . borderBottomWidth != borderBottomWidth ) { if ( this . borderBottomWidth != null ) { borderBottomWidthTemp = this . borderBottomWidth . setCssValue ( borderTopWidth . getCssValue ( ) ) ; if ( LOGGER . isLoggable ( Level . WARNING ) ) { LOGGER . warning ( "the given borderBottomWidth is already used by another object so the existing object is used" ) ; } } else { borderBottomWidthTemp = borderBottomWidth . clone ( ) ; if ( LOGGER . isLoggable ( Level . WARNING ) ) { LOGGER . warning ( "the given borderBottomWidth is already used by another object so its clone is assigned" ) ; } } } else { borderBottomWidthTemp = borderBottomWidth ; } if ( borderLeftWidth . isAlreadyInUse ( ) && this . borderLeftWidth != borderLeftWidth ) { if ( this . borderLeftWidth != null ) { borderLeftWidthTemp = this . borderLeftWidth . setCssValue ( borderTopWidth . getCssValue ( ) ) ; if ( LOGGER . isLoggable ( Level . WARNING ) ) { LOGGER . warning ( "the given borderLeftWidth is already used by another object so the existing object is used" ) ; } } else { borderLeftWidthTemp = borderLeftWidth . clone ( ) ; if ( LOGGER . isLoggable ( Level . WARNING ) ) { LOGGER . warning ( "the given borderLeftWidth is already used by another object so its clone is assigned" ) ; } } } else { borderLeftWidthTemp = borderLeftWidth ; } borderTopWidthTemp . setAlreadyInUse ( true ) ; borderTopWidthTemp . setStateChangeInformer ( this ) ; borderRightWidthTemp . setAlreadyInUse ( true ) ; borderRightWidthTemp . setStateChangeInformer ( this ) ; borderBottomWidthTemp . setAlreadyInUse ( true ) ; borderBottomWidthTemp . setStateChangeInformer ( this ) ; borderLeftWidthTemp . setAlreadyInUse ( true ) ; borderLeftWidthTemp . setStateChangeInformer ( this ) ; assignProducedCssValue ( borderTopWidth , borderRightWidth , borderBottomWidth , borderLeftWidth ) ; this . borderTopWidth = borderTopWidthTemp ; this . borderRightWidth = borderRightWidthTemp ; this . borderBottomWidth = borderBottomWidthTemp ; this . borderLeftWidth = borderLeftWidthTemp ; } catch ( final CloneNotSupportedException e ) { throw new InvalidValueException ( e ) ; } catch ( final Exception e ) { throw new InvalidValueException ( e ) ; } } else { throw new NullValueException ( "cannot accept null arguments" ) ; }


signature:
public class BorderWidth { /** * ( non - Javadoc )
 * @ see
 * com . webfirmframework . wffweb . informer . StateChangeInformer # stateChanged (
 * java . lang . Object ) */
@ Override public void stateChanged ( final CssProperty stateChangedObject ) { } }

implementation: if ( stateChangedObject instanceof BorderTopWidth ) { final BorderTopWidth borderTopWidth = ( BorderTopWidth ) stateChangedObject ; if ( BorderTopWidth . INITIAL . equals ( borderTopWidth . getCssValue ( ) ) || BorderTopWidth . INHERIT . equals ( borderTopWidth . getCssValue ( ) ) ) { throw new InvalidValueException ( "borderTopWidth cannot have initial/inherit as its cssValue" ) ; } } else if ( stateChangedObject instanceof BorderRightWidth ) { final BorderRightWidth borderRightWidth = ( BorderRightWidth ) stateChangedObject ; if ( BorderRightWidth . INITIAL . equals ( borderRightWidth . getCssValue ( ) ) || BorderRightWidth . INHERIT . equals ( borderRightWidth . getCssValue ( ) ) ) { throw new InvalidValueException ( "borderRightWidth cannot have initial/inherit as its cssValue" ) ; } } else if ( stateChangedObject instanceof BorderBottomWidth ) { final BorderBottomWidth borderBottomWidth = ( BorderBottomWidth ) stateChangedObject ; if ( BorderBottomWidth . INITIAL . equals ( borderBottomWidth . getCssValue ( ) ) || BorderBottomWidth . INHERIT . equals ( borderBottomWidth . getCssValue ( ) ) ) { throw new InvalidValueException ( "borderBottomWidth cannot have initial/inherit as its cssValue" ) ; } } else if ( stateChangedObject instanceof BorderLeftWidth ) { final BorderLeftWidth borderLeftWidth = ( BorderLeftWidth ) stateChangedObject ; if ( BorderLeftWidth . INITIAL . equals ( borderLeftWidth . getCssValue ( ) ) || BorderLeftWidth . INHERIT . equals ( borderLeftWidth . getCssValue ( ) ) ) { throw new InvalidValueException ( "borderLeftWidth cannot have initial/inherit as its cssValue" ) ; } } assignProducedCssValue ( borderTopWidth , borderRightWidth , borderBottomWidth , borderLeftWidth ) ;


signature:
public class BorderWidth { /** * validates if the given cssValue is valid for this class .
 * @ param cssValue
 * the value to check .
 * @ return true if valid and false if invalid .
 * @ author WFF
 * @ since 1.0.0 */
public static boolean isValid ( final String cssValue ) { } }

implementation: final String trimmedCssValue = StringUtil . strip ( cssValue ) . toLowerCase ( ) ; final String [ ] cssValueParts = StringUtil . splitBySpace ( trimmedCssValue ) ; if ( cssValueParts . length > 4 ) { return false ; } for ( final String cssValuePart : cssValueParts ) { boolean invalidValue = true ; for ( final CssLengthUnit cssLengthUnit : CssLengthUnit . values ( ) ) { final String unit = cssLengthUnit . getUnit ( ) ; if ( cssValuePart . endsWith ( unit ) ) { final String valueOnly = cssValuePart . replaceFirst ( unit , "" ) ; try { Float . parseFloat ( valueOnly ) ; } catch ( final NumberFormatException e ) { break ; } invalidValue = false ; break ; } } if ( PREDEFINED_CONSTANTS . contains ( cssValuePart ) ) { invalidValue = false ; } if ( invalidValue ) { return false ; } } return true ;


signature:
public class AbstractCssFileBlock { /** * rebuild true to rebuild , the load method will be invoked again .
 * @ return the cssProperties as map with key as the cssName and value as
 * { @ code CssProperty } .
 * @ since 1.0.0
 * @ author WFF */
Map < String , CssProperty > getCssPropertiesAsMap ( final boolean rebuild ) { } }

implementation: if ( rebuild || ! loadedOnce ) { synchronized ( cssProperties ) { if ( rebuild || ! loadedOnce ) { cssProperties . clear ( ) ; load ( cssProperties ) ; loadedOnce = true ; setModified ( true ) ; } } } return cssPropertiesAsMap ;


signature:
public class AbstractEventAttribute { /** * @ param jsPreFunctionBody
 * the body part javascript function
 * ( without function declaration ) . It must
 * return true / false . This function will
 * invoke at client side before
 * { @ code serverAsyncMethod } . If the
 * jsPrefunction returns true then only
 * { @ code serverAsyncMethod } method will
 * invoke ( if it is implemented ) . It has
 * implicit objects like { @ code event } and
 * { @ code source } which gives the reference
 * of the current tag . < br >
 * Eg : -
 * < pre >
 * if ( source . type = = ' button ' ) {
 * return true ;
 * return false ;
 * < / pre >
 * @ param serverAsyncMethod
 * This method will invoke at server side
 * with an argument { @ code wffBMObject } . The
 * { @ code wffBMObject } is the
 * representational javascript object
 * returned by { @ code jsFilterFunctionBody } .
 * @ param jsFilterFunctionBody
 * The body part of a javascript function
 * ( without function declaration ) . It can
 * return a javascript object so that it
 * will be available at server side in
 * { @ code serverAsyncMethod } as
 * { @ code wffBMObject } parameter . There are
 * implicit objects { @ code event } and
 * { @ code source } in the scope . < br >
 * Eg : -
 * < pre >
 * var bName = source . name ;
 * return { buttonName : bName , author : ' wff ' , dateOfYear : 2014 } ;
 * < / pre >
 * @ param jsPostFunctionBody
 * The body part of a javascript function
 * ( without function declaration ) . The
 * { @ code wffBMObject } returned by
 * { @ code serverAsyncMethod } will be
 * available as an implicit object
 * { @ code jsObject } in the scope . There are
 * common implicit objects { @ code event } and
 * { @ code source } in the scope .
 * @ since 2.0.0
 * @ author WFF */
public void setServerAsyncMethod ( final String jsPreFunctionBody , final ServerAsyncMethod serverAsyncMethod , final String jsFilterFunctionBody , final String jsPostFunctionBody ) { } }

implementation: setServerAsyncMethod ( jsPreFunctionBody , serverAsyncMethod , jsFilterFunctionBody , jsPostFunctionBody , serverSideData ) ;


signature:
public class AbstractEventAttribute { /** * @ param jsPreFunctionBody
 * the body part javascript function
 * ( without function declaration ) . It must
 * return true / false . This function will
 * invoke at client side before
 * { @ code serverAsyncMethod } . If the
 * jsPrefunction returns true then only
 * { @ code serverAsyncMethod } method will
 * invoke ( if it is implemented ) . It has
 * implicit objects like { @ code event } and
 * { @ code source } which gives the reference
 * of the current tag . < br >
 * Eg : -
 * < pre >
 * if ( source . type = = ' button ' ) {
 * return true ;
 * return false ;
 * < / pre >
 * @ param serverAsyncMethod
 * This method will invoke at server side
 * with an argument { @ code wffBMObject } . The
 * { @ code wffBMObject } is the
 * representational javascript object
 * returned by { @ code jsFilterFunctionBody } .
 * @ param jsFilterFunctionBody
 * The body part of a javascript function
 * ( without function declaration ) . It can
 * return a javascript object so that it
 * will be available at server side in
 * { @ code serverAsyncMethod } as
 * { @ code wffBMObject } parameter . There are
 * implicit objects { @ code event } and
 * { @ code source } in the scope . < br >
 * Eg : -
 * < pre >
 * var bName = source . name ;
 * return { buttonName : bName , author : ' wff ' , dateOfYear : 2014 } ;
 * < / pre >
 * @ param jsPostFunctionBody
 * The body part of a javascript function
 * ( without function declaration ) . The
 * { @ code wffBMObject } returned by
 * { @ code serverAsyncMethod } will be
 * available as an implicit object
 * { @ code jsObject } in the scope . There are
 * common implicit objects { @ code event } and
 * { @ code source } in the scope .
 * @ param serverSideData
 * this data will be available in the Event
 * object of ServerAsyncMethod . asyncMethod
 * method .
 * @ since 3.0.2
 * @ author WFF */
public void setServerAsyncMethod ( final String jsPreFunctionBody , final ServerAsyncMethod serverAsyncMethod , final String jsFilterFunctionBody , final String jsPostFunctionBody , final Object serverSideData ) { } }

implementation: this . serverSideData = serverSideData ; if ( serverAsyncMethod != null ) { if ( jsPreFunctionBody != null && jsPostFunctionBody != null && jsFilterFunctionBody != null ) { super . setAttributeValue ( new StringBuilder ( invokeAsyncWithPreFilterFun ) . append ( "(event, this,'" ) . append ( getAttributeName ( ) ) . append ( "'," ) . append ( getPreparedJsFunctionBody ( jsPreFunctionBody ) ) . append ( ',' ) . append ( getPreparedJsFunctionBody ( jsFilterFunctionBody ) ) . append ( ')' ) . toString ( ) ) ; } else if ( jsPreFunctionBody != null && jsPostFunctionBody != null ) { super . setAttributeValue ( new StringBuilder ( invokeAsyncWithPreFun ) . append ( "(event, this,'" ) . append ( getAttributeName ( ) ) . append ( "'," ) . append ( getPreparedJsFunctionBody ( jsPreFunctionBody ) ) . append ( ')' ) . toString ( ) ) ; } else if ( jsPreFunctionBody != null && jsFilterFunctionBody != null ) { super . setAttributeValue ( new StringBuilder ( invokeAsyncWithPreFilterFun ) . append ( "(event, this,'" ) . append ( getAttributeName ( ) ) . append ( "'," ) . append ( getPreparedJsFunctionBody ( jsPreFunctionBody ) ) . append ( ',' ) . append ( getPreparedJsFunctionBody ( jsFilterFunctionBody ) ) . append ( ')' ) . toString ( ) ) ; } else if ( jsPostFunctionBody != null && jsFilterFunctionBody != null ) { super . setAttributeValue ( new StringBuilder ( invokeAsyncWithFilterFun ) . append ( "(event, this,'" ) . append ( getAttributeName ( ) ) . append ( "'," ) . append ( getPreparedJsFunctionBody ( jsFilterFunctionBody ) ) . append ( ')' ) . toString ( ) ) ; } else if ( jsPreFunctionBody != null ) { super . setAttributeValue ( new StringBuilder ( invokeAsyncWithPreFun ) . append ( "(event, this,'" ) . append ( getAttributeName ( ) ) . append ( "'," ) . append ( getPreparedJsFunctionBody ( jsPreFunctionBody ) ) . append ( ')' ) . toString ( ) ) ; } else if ( jsFilterFunctionBody != null ) { super . setAttributeValue ( new StringBuilder ( invokeAsyncWithFilterFun ) . append ( "(event, this,'" ) . append ( getAttributeName ( ) ) . append ( "'," ) . append ( getPreparedJsFunctionBody ( jsFilterFunctionBody ) ) . append ( ')' ) . toString ( ) ) ; } else if ( jsPostFunctionBody != null ) { super . setAttributeValue ( new StringBuilder ( invokeAsync ) . append ( "(event, this,'" ) . append ( getAttributeName ( ) ) . append ( "')" ) . toString ( ) ) ; } else { super . setAttributeValue ( new StringBuilder ( invokeAsync ) . append ( "(event, this,'" ) . append ( getAttributeName ( ) ) . append ( "')" ) . toString ( ) ) ; } this . jsPreFunctionBody = jsPreFunctionBody ; this . jsFilterFunctionBody = jsFilterFunctionBody ; this . jsPostFunctionBody = jsPostFunctionBody ; this . serverAsyncMethod = serverAsyncMethod ; } else { LOGGER . warning ( "serverAsyncMethod is null so jsPreFunctionBody, jsFilterFunctionBody and jsPostFunctionBody are not also set.They are valid only if serverAsyncMethod is NOT null." ) ; }


signature:
public class BorderBottom { /** * checks the given css value is valid for this class . It does ' t do a strict
 * validation .
 * @ param cssValue
 * @ return
 * @ since 1.0.0
 * @ author WFF */
public static boolean isValid ( final String cssValue ) { } }

implementation:
// TODO modify to make a strict validation
if ( cssValue == null || StringUtil . isBlank ( cssValue ) ) { return false ; } final List < String > cssValueParts = CssValueUtil . split ( cssValue ) ; BorderBottomWidth borderBottomWidth = null ; BorderBottomStyle borderBottomStyle = null ; BorderBottomColor borderBottomColor = null ; for ( final String eachPart : cssValueParts ) { boolean invalid = true ; if ( borderBottomWidth == null && BorderBottomWidth . isValid ( eachPart ) ) { borderBottomWidth = new BorderBottomWidth ( eachPart ) ; invalid = false ; } else if ( borderBottomStyle == null && BorderBottomStyle . isValid ( eachPart ) ) { borderBottomStyle = BorderBottomStyle . getThis ( eachPart ) ; invalid = false ; } else if ( borderBottomColor == null && BorderBottomColor . isValid ( eachPart ) ) { borderBottomColor = new BorderBottomColor ( eachPart ) ; invalid = false ; } if ( invalid ) { return false ; } } return borderBottomWidth != null || borderBottomStyle != null || borderBottomColor != null ;


signature:
public class CharsetUtil { /** * gets the char array of upper case chars from 0 to the given { @ code upto }
 * value .
 * @ param upto
 * @ return
 * @ since 1.0.0
 * @ author WFF */
public static char [ ] getUpperCaseCharset ( final int upto ) { } }

implementation: final int uptoPlusOne = upto + 1 ; final char [ ] characters = CHACHED_UPPER_CASE_CHARSETS . get ( uptoPlusOne ) ; if ( characters != null ) { return characters ; } final char [ ] charset = new char [ uptoPlusOne ] ; char index = 0 ; while ( index < uptoPlusOne ) { charset [ index ] = Character . toUpperCase ( index ) ; index ++ ; } final char [ ] previous = CHACHED_UPPER_CASE_CHARSETS . putIfAbsent ( uptoPlusOne , charset ) ; if ( previous != null ) { return previous ; } return charset ;


signature:
public class CharsetUtil { /** * gets the char array of lower case chars from 0 to the given { @ code upto }
 * value .
 * @ param upto
 * @ return
 * @ since 1.0.0
 * @ author WFF */
public static char [ ] getLowerCaseCharset ( final int upto ) { } }

implementation: final int uptoPlusOne = upto + 1 ; final char [ ] characters = CHACHED_LOWER_CASE_CHARSETS . get ( uptoPlusOne ) ; if ( characters != null ) { return characters ; } final char [ ] charset = new char [ uptoPlusOne ] ; char index = 0 ; while ( index < uptoPlusOne ) { charset [ index ] = Character . toLowerCase ( index ) ; index ++ ; } final char [ ] previous = CHACHED_LOWER_CASE_CHARSETS . putIfAbsent ( uptoPlusOne , charset ) ; if ( previous != null ) { return previous ; } return charset ;


signature:
public class ListStyle { /** * checks the given css value is valid for this class . It does ' t do a strict
 * validation .
 * @ param cssValue
 * @ return
 * @ since 1.0.0
 * @ author WFF */
public static boolean isValid ( final String cssValue ) { } }

implementation:
// TODO modify to make a strict validation
if ( cssValue == null || StringUtil . isBlank ( cssValue ) ) { return false ; } final String [ ] cssValueParts = StringUtil . splitBySpace ( cssValue ) ; ListStyleType listStyleType = null ; ListStylePosition listStylePosition = null ; ListStyleImage listStyleImage = null ; for ( final String eachPart : cssValueParts ) { boolean invalid = true ; if ( listStyleType == null && ListStyleType . isValid ( eachPart ) ) { listStyleType = ListStyleType . getThis ( eachPart ) ; invalid = false ; } else if ( listStylePosition == null && ListStylePosition . isValid ( eachPart ) ) { listStylePosition = ListStylePosition . getThis ( eachPart ) ; invalid = false ; } else if ( listStyleImage == null && ListStyleImage . isValid ( eachPart ) ) { listStyleImage = new ListStyleImage ( eachPart ) ; invalid = false ; } if ( invalid ) { return false ; } } return listStyleType != null || listStylePosition != null || listStyleImage != null ;


signature:
public class Outline { /** * checks the given css value is valid for this class . It does ' t do a strict
 * validation .
 * @ param cssValue
 * @ return
 * @ since 1.0.0
 * @ author WFF */
public static boolean isValid ( final String cssValue ) { } }

implementation:
// TODO modify to make a strict validation
if ( cssValue == null || StringUtil . isBlank ( cssValue ) ) { return false ; } final List < String > cssValueParts = CssValueUtil . split ( cssValue ) ; OutlineColor outlineColor = null ; OutlineStyle outlineStyle = null ; OutlineWidth outlineWidth = null ; for ( final String eachPart : cssValueParts ) { boolean invalid = true ; if ( outlineColor == null && OutlineColor . isValid ( eachPart ) ) { outlineColor = new OutlineColor ( eachPart ) ; invalid = false ; } else if ( outlineStyle == null && OutlineStyle . isValid ( eachPart ) ) { outlineStyle = OutlineStyle . getThis ( eachPart ) ; invalid = false ; } else if ( outlineWidth == null && OutlineWidth . isValid ( eachPart ) ) { outlineWidth = new OutlineWidth ( eachPart ) ; invalid = false ; } if ( invalid ) { return false ; } } return outlineWidth != null || outlineStyle != null || outlineColor != null ;


signature:
public class BorderImageRepeat { /** * validates if the given cssValue is valid for this class .
 * @ param cssValue
 * the value to check .
 * @ return true if valid and false if invalid .
 * @ author WFF
 * @ since 1.0.0 */
public static boolean isValid ( final String cssValue ) { } }

implementation: final String trimmedCssValue = TagStringUtil . toLowerCase ( StringUtil . strip ( cssValue ) ) ; final String [ ] cssValueParts = StringUtil . splitBySpace ( trimmedCssValue ) ; if ( cssValueParts . length > 2 ) { return false ; } if ( cssValueParts . length == 1 ) { return PREDEFINED_CONSTANTS . contains ( trimmedCssValue ) ; } boolean valid = false ; for ( final String each : cssValueParts ) { if ( ! PREDEFINED_CONSTANTS . contains ( each ) ) { return false ; } if ( ( INITIAL . equals ( each ) || INHERIT . equals ( each ) ) && cssValueParts . length == 2 ) { return false ; } valid = true ; } return valid ;


signature:
public class AbstractHtmlRepository { /** * Loops through all nested children tags ( excluding the given tag ) of the
 * given tag . The looping is in a random order to gain maximum performance
 * and minimum memory footprint .
 * @ param nestedChild
 * the object of NestedChild from which the
 * eachChild ( AbstractHtml ) to be invoked .
 * @ param includeParents
 * true to include the given parent tags in the
 * loop
 * @ param parents
 * the tags from which to loop through .
 * @ since 2.1.8
 * @ author WFF */
protected static void loopThroughAllNestedChildren ( final NestedChild nestedChild , final boolean includeParents , final AbstractHtml ... parents ) { } }

implementation: AbstractHtml . loopThroughAllNestedChildren ( nestedChild , includeParents , parents ) ;


signature:
public class Font { /** * checks the given css value is valid for this class . It does ' t do a strict
 * validation .
 * @ param cssValue
 * @ return
 * @ since 1.0.0
 * @ author WFF */
public static boolean isValid ( final String cssValue ) { } }

implementation:
// TODO verify this method . the fontFamily cannot be validated so this
// method may be invalid . remove after verified
if ( cssValue == null || StringUtil . isBlank ( cssValue ) ) { return false ; } final String [ ] cssValueParts = getExtractedSubCssValues ( cssValue ) ; FontStyle fontStyle = null ; FontVariant fontVariant = null ; FontWeight fontWeight = null ; FontSize fontSize = null ; LineHeight lineHeight = null ; FontFamily fontFamily = null ; for ( final String eachPart : cssValueParts ) { boolean invalid = true ; if ( fontStyle == null && FontStyle . isValid ( eachPart ) ) { fontStyle = FontStyle . getThis ( eachPart ) ; invalid = false ; } else if ( fontVariant == null && FontVariant . isValid ( eachPart ) ) { fontVariant = FontVariant . getThis ( eachPart ) ; invalid = false ; } else if ( fontWeight == null && FontWeight . isValid ( eachPart ) ) { fontWeight = FontWeight . getThis ( eachPart ) ; invalid = false ; } else if ( fontSize == null && FontSize . isValid ( eachPart ) ) { fontSize = new FontSize ( eachPart ) ; invalid = false ; } else if ( lineHeight == null && LineHeight . isValid ( eachPart ) ) { lineHeight = new LineHeight ( eachPart ) ; invalid = false ; } else if ( fontFamily == null && ( ! FontFamily . isValidateFontFamilyNameGlobally ( ) || FontFamily . isValid ( eachPart ) ) ) { fontFamily = new FontFamily ( eachPart ) ; invalid = false ; } if ( invalid ) { return false ; } } return fontStyle != null || fontVariant != null || fontWeight != null || fontSize != null || lineHeight != null || fontFamily != null ;


signature:
public class AbstractHtml5SharedObject { /** * gets the set containing the objects which are rebuilt after modified by
 * its { @ code AbstractTagBase } method . NB : - only for internal use . currently
 * it ' s not used anywhere
 * @ return the rebuiltTags
 * @ since 1.0.0
 * @ author WFF
 * @ deprecated only for internal use currently it ' s not used anywhere . Needs
 * to remove this method later . */
@ Deprecated public Set < AbstractTagBase > getRebuiltTags ( final Object accessObject ) { } }

implementation:
// TODO remove this method later
if ( accessObject == null || ! ( SecurityClassConstants . ABSTRACT_HTML . equals ( accessObject . getClass ( ) . getName ( ) ) ) ) { throw new WffSecurityException ( "Not allowed to consume this method. This method is for internal use." ) ; } if ( rebuiltTags == null ) { synchronized ( this ) { if ( rebuiltTags == null ) { rebuiltTags = Collections . newSetFromMap ( new WeakHashMap < AbstractTagBase , Boolean > ( ) ) ; } } } return rebuiltTags ;


signature:
public class AbstractHtml5SharedObject { /** * NB : - This method is for only for internal use
 * @ return the childTagAppendListener */
public ChildTagAppendListener getChildTagAppendListener ( final Object accessObject ) { } }

implementation: if ( accessObject == null || ! ( SecurityClassConstants . ABSTRACT_HTML . equals ( accessObject . getClass ( ) . getName ( ) ) ) ) { throw new WffSecurityException ( "Not allowed to consume this method. This method is for internal use." ) ; } return childTagAppendListener ;


signature:
public class AbstractHtml5SharedObject { /** * NB : - This method is for only for internal use
 * @ param childTagAppendListener
 * the childTagAppendListener to set */
public void setChildTagAppendListener ( final ChildTagAppendListener childTagAppendListener , final Object accessObject ) { } }

implementation: if ( accessObject == null || ! ( SecurityClassConstants . BROWSER_PAGE . equals ( accessObject . getClass ( ) . getName ( ) ) ) ) { throw new WffSecurityException ( "Not allowed to consume this method. This method is for internal use." ) ; } this . childTagAppendListener = childTagAppendListener ;


signature:
public class AbstractHtml5SharedObject { /** * NB : - This method is for only for internal use
 * @ return the childTagRemoveListener */
public ChildTagRemoveListener getChildTagRemoveListener ( final Object accessObject ) { } }

implementation: if ( accessObject == null || ! ( SecurityClassConstants . ABSTRACT_HTML . equals ( accessObject . getClass ( ) . getName ( ) ) ) ) { throw new WffSecurityException ( "Not allowed to consume this method. This method is for internal use." ) ; } return childTagRemoveListener ;


signature:
public class AbstractHtml5SharedObject { /** * NB : - This method is for only for internal use
 * @ param childTagRemoveListener
 * the childTagRemoveListener to set */
public void setChildTagRemoveListener ( final ChildTagRemoveListener childTagRemoveListener , final Object accessObject ) { } }

implementation: if ( accessObject == null || ! ( SecurityClassConstants . BROWSER_PAGE . equals ( accessObject . getClass ( ) . getName ( ) ) ) ) { throw new WffSecurityException ( "Not allowed to consume this method. This method is for internal use." ) ; } this . childTagRemoveListener = childTagRemoveListener ;


signature:
public class AbstractHtml5SharedObject { /** * NB : - This listener is used for internal purpose and should not be
 * consumed . Instead , use addValueChangeListener and getValueChangeListeners
 * methods .
 * @ param accessObject
 * access object of this method
 * @ return the valueChangeListener */
public AttributeValueChangeListener getValueChangeListener ( final Object accessObject ) { } }

implementation: if ( accessObject == null || ! ( SecurityClassConstants . ABSTRACT_ATTRIBUTE . equals ( accessObject . getClass ( ) . getName ( ) ) ) ) { throw new WffSecurityException ( "Not allowed to consume this method. Instead, use addValueChangeListener and getValueChangeListeners methods." ) ; } return valueChangeListener ;


signature:
public class AbstractHtml5SharedObject { /** * NB : - This listener is used for internal purpose and should not be
 * consumed . Instead , use addValueChangeListener and getValueChangeListeners
 * methods .
 * @ param valueChangeListener
 * the valueChangeListener to set
 * @ param accessObject
 * access object of this method */
public void setValueChangeListener ( final AttributeValueChangeListener valueChangeListener , final Object accessObject ) { } }

implementation: if ( accessObject == null || ! ( SecurityClassConstants . BROWSER_PAGE . equals ( accessObject . getClass ( ) . getName ( ) ) ) ) { throw new WffSecurityException ( "Not allowed to consume this method. Instead, use addValueChangeListener and getValueChangeListeners methods." ) ; } this . valueChangeListener = valueChangeListener ;


signature:
public class AbstractHtml5SharedObject { /** * NB : - This method is for only for internal use
 * @ return the insertBeforeListener
 * @ since 2.1.1 */
public InsertBeforeListener getInsertBeforeListener ( final Object accessObject ) { } }

implementation: if ( accessObject == null || ! ( SecurityClassConstants . ABSTRACT_HTML . equals ( accessObject . getClass ( ) . getName ( ) ) ) ) { throw new WffSecurityException ( "Not allowed to consume this method. This method is for internal use." ) ; } return insertBeforeListener ;


signature:
public class AbstractHtml5SharedObject { /** * NB : - This method is for only for internal use
 * @ param insertBeforeListener
 * the insertBeforeListener to set
 * @ since 2.1.1 */
public void setInsertBeforeListener ( final InsertBeforeListener insertBeforeListener , final Object accessObject ) { } }

implementation: if ( accessObject == null || ! ( SecurityClassConstants . BROWSER_PAGE . equals ( accessObject . getClass ( ) . getName ( ) ) ) ) { throw new WffSecurityException ( "Not allowed to consume this method. This method is for internal use." ) ; } this . insertBeforeListener = insertBeforeListener ;


signature:
public class AbstractHtml5SharedObject { /** * NB : - This method is for only for internal use
 * @ param wffBMDataDeleteListener
 * the wffDataDeleteListener to set
 * @ since 2.1.8 */
public void setWffBMDataDeleteListener ( final WffBMDataDeleteListener wffBMDataDeleteListener , final Object accessObject ) { } }

implementation: if ( accessObject == null || ! ( SecurityClassConstants . BROWSER_PAGE . equals ( accessObject . getClass ( ) . getName ( ) ) ) ) { throw new WffSecurityException ( "Not allowed to consume this method. This method is for internal use." ) ; } this . wffBMDataDeleteListener = wffBMDataDeleteListener ;


signature:
public class AbstractHtml5SharedObject { /** * NB : - This method is for only for internal use
 * @ param wffBMDataUpdateListener
 * the wffDataUpdateListener to set
 * @ since 2.1.8 */
public void setWffBMDataUpdateListener ( final WffBMDataUpdateListener wffBMDataUpdateListener , final Object accessObject ) { } }

implementation: if ( accessObject == null || ! ( SecurityClassConstants . BROWSER_PAGE . equals ( accessObject . getClass ( ) . getName ( ) ) ) ) { throw new WffSecurityException ( "Not allowed to consume this method. This method is for internal use." ) ; } this . wffBMDataUpdateListener = wffBMDataUpdateListener ;


signature:
public class AbstractHtml5SharedObject { /** * NB : - This method is for only for internal use
 * @ return the insertBeforeListener
 * @ since 2.1.8 */
public WffBMDataDeleteListener getWffBMDataDeleteListener ( final Object accessObject ) { } }

implementation: if ( accessObject == null || ! ( SecurityClassConstants . ABSTRACT_JS_OBJECT . equals ( accessObject . getClass ( ) . getName ( ) ) ) ) { throw new WffSecurityException ( "Not allowed to consume this method. This method is for internal use." ) ; } return wffBMDataDeleteListener ;


signature:
public class AbstractHtml5SharedObject { /** * NB : - This method is for only for internal use
 * @ return the insertBeforeListener
 * @ since 2.1.8 */
public WffBMDataUpdateListener getWffBMDataUpdateListener ( final Object accessObject ) { } }

implementation: if ( accessObject == null || ! ( SecurityClassConstants . ABSTRACT_JS_OBJECT . equals ( accessObject . getClass ( ) . getName ( ) ) ) ) { throw new WffSecurityException ( "Not allowed to consume this method. This method is for internal use." ) ; } return wffBMDataUpdateListener ;


signature:
public class AbstractHtml5SharedObject { /** * NB : - This method is for only for internal use
 * @ param pushQueue
 * the BrowserPage push queue to set */
public void setPushQueue ( final PushQueue pushQueue , final Object accessObject ) { } }

implementation: if ( accessObject == null || ! ( SecurityClassConstants . BROWSER_PAGE . equals ( accessObject . getClass ( ) . getName ( ) ) ) ) { throw new WffSecurityException ( "Not allowed to consume this method. This method is for internal use." ) ; } this . pushQueue = pushQueue ;


signature:
public class AbstractHtml5SharedObject { /** * NB : - This method is for only for internal use
 * @ return the the push queue of BrowserPage */
public PushQueue getPushQueue ( final Object accessObject ) { } }

implementation: if ( accessObject == null || ! ( SecurityClassConstants . ABSTRACT_HTML . equals ( accessObject . getClass ( ) . getName ( ) ) || SecurityClassConstants . ABSTRACT_ATTRIBUTE . equals ( accessObject . getClass ( ) . getName ( ) ) || SecurityClassConstants . ABSTRACT_JS_OBJECT . equals ( accessObject . getClass ( ) . getName ( ) ) ) ) { throw new WffSecurityException ( "Not allowed to consume this method. This method is for internal use." ) ; } return pushQueue ;


signature:
public class TagRepository { /** * Finds and returns the first tag matching with the given id .
 * @ param id
 * the value of id attribute .
 * @ param fromTags
 * from the given tags and its nested children the
 * finding to be done .
 * @ return the first found tag with the given id
 * @ throws NullValueException
 * if the { @ code id } or { @ code fromTags } is
 * null
 * @ since 2.1.8
 * @ author WFF */
public static AbstractHtml findTagById ( final String id , final AbstractHtml ... fromTags ) throws NullValueException { } }

implementation: return findTagById ( false , id , fromTags ) ;


signature:
public class TagRepository { /** * Finds and returns the first tag matching with the given id .
 * @ param parallel
 * true to internally use parallel stream . If true it
 * will split the finding task to different batches and
 * will execute the batches in different threads in
 * parallel consuming all CPUs . It will perform faster
 * in finding from extremely large number of tags but at
 * the same time it will less efficient in finding from
 * small number of tags .
 * @ param id
 * the value of id attribute .
 * @ param fromTags
 * from the given tags and its nested children the
 * finding to be done .
 * @ return the first found tag with the given id
 * @ throws NullValueException
 * if the { @ code id } or { @ code fromTags } is
 * null
 * @ since 3.0.0
 * @ author WFF */
public static AbstractHtml findTagById ( final boolean parallel , final String id , final AbstractHtml ... fromTags ) throws NullValueException { } }

implementation: if ( id == null ) { throw new NullValueException ( "The id should not be null" ) ; } if ( fromTags == null ) { throw new NullValueException ( "The fromTags should not be null" ) ; } final Collection < Lock > locks = getReadLocks ( fromTags ) ; for ( final Lock lock : locks ) { lock . lock ( ) ; } try { final Stream < AbstractHtml > stream = getAllNestedChildrenIncludingParent ( parallel , fromTags ) ; final Optional < AbstractHtml > any = stream . filter ( child -> { final AbstractAttribute idAttr = child . getAttributeByName ( AttributeNameConstants . ID ) ; return idAttr != null && id . equals ( idAttr . getAttributeValue ( ) ) ; } ) . findAny ( ) ; if ( any . isPresent ( ) ) { return any . get ( ) ; } return null ; } finally { for ( final Lock lock : locks ) { lock . unlock ( ) ; } }


signature:
public class TagRepository { /** * Finds and returns the first tag matching with the given id .
 * @ param parallel
 * true to internally use parallel stream . If true it
 * will split the finding task to different batches and
 * will execute the batches in different threads in
 * parallel consuming all CPUs . It will perform faster
 * in finding from extremely large number of tags but at
 * the same time it will less efficient in finding from
 * small number of tags .
 * @ param id
 * the value of id attribute .
 * @ return the first found tag with the given id
 * @ throws NullValueException
 * if the { @ code id } is null
 * @ since 3.0.0
 * @ author WFF */
public AbstractHtml findTagById ( final boolean parallel , final String id ) throws NullValueException { } }

implementation: return findOneTagByAttribute ( parallel , AttributeNameConstants . ID , id ) ;


signature:
public class TagRepository { /** * Finds and returns the collection of tags ( including the nested tags )
 * matching with the given attribute name and value .
 * @ param attributeName
 * the name of the attribute .
 * @ param attributeValue
 * the value of the attribute
 * @ param fromTags
 * from which the findings to be done .
 * @ return the collection of tags matching with the given attribute name and
 * value .
 * @ throws NullValueException
 * if the { @ code attributeName } ,
 * { @ code attributeValue } or { @ code fromTags }
 * is null
 * @ since 2.1.8
 * @ author WFF */
public static Collection < AbstractHtml > findTagsByAttribute ( final String attributeName , final String attributeValue , final AbstractHtml ... fromTags ) throws NullValueException { } }

implementation: return findTagsByAttribute ( false , attributeName , attributeValue , fromTags ) ;


signature:
public class TagRepository { /** * Finds and returns the collection of tags ( including the nested tags )
 * matching with the given attribute name and value .
 * @ param parallel
 * true to internally use parallel stream . If true
 * it will split the finding task to different
 * batches and will execute the batches in
 * different threads in parallel consuming all
 * CPUs . It will perform faster in finding from
 * extremely large number of tags but at the same
 * time it will less efficient in finding from
 * small number of tags .
 * @ param attributeName
 * the name of the attribute .
 * @ param attributeValue
 * the value of the attribute
 * @ param fromTags
 * from which the findings to be done .
 * @ return the collection of tags matching with the given attribute name and
 * value .
 * @ throws NullValueException
 * if the { @ code attributeName } ,
 * { @ code attributeValue } or { @ code fromTags }
 * is null
 * @ since 3.0.0
 * @ author WFF */
public static Collection < AbstractHtml > findTagsByAttribute ( final boolean parallel , final String attributeName , final String attributeValue , final AbstractHtml ... fromTags ) throws NullValueException { } }

implementation: if ( attributeName == null ) { throw new NullValueException ( "The attributeName should not be null" ) ; } if ( attributeValue == null ) { throw new NullValueException ( "The attributeValue should not be null" ) ; } if ( fromTags == null ) { throw new NullValueException ( "The fromTags should not be null" ) ; } final Collection < Lock > locks = getReadLocks ( fromTags ) ; for ( final Lock lock : locks ) { lock . lock ( ) ; } try { return getAllNestedChildrenIncludingParent ( parallel , fromTags ) . filter ( child -> { final AbstractAttribute attribute = child . getAttributeByName ( attributeName ) ; return attribute != null && attributeValue . equals ( attribute . getAttributeValue ( ) ) ; } ) . collect ( Collectors . toSet ( ) ) ; } finally { for ( final Lock lock : locks ) { lock . unlock ( ) ; } }


signature:
public class TagRepository { /** * Finds and returns the collection of tags ( including the nested tags )
 * matching with the give tag name .
 * @ param tagName
 * the name of the tag .
 * @ param fromTags
 * from which the findings to be done .
 * @ return the collection of tags matching with the given tag name .
 * @ throws NullValueException
 * if the { @ code tagName } or { @ code fromTags }
 * is null
 * @ since 2.1.11
 * @ author WFF */
public static Collection < AbstractHtml > findTagsByTagName ( final String tagName , final AbstractHtml ... fromTags ) throws NullValueException { } }

implementation: return findTagsByTagName ( false , tagName , fromTags ) ;


signature:
public class TagRepository { /** * Finds and returns the collection of tags ( including the nested tags )
 * matching with the give tag name .
 * @ param parallel
 * true to internally use parallel stream . If true it
 * will split the finding task to different batches and
 * will execute the batches in different threads in
 * parallel consuming all CPUs . It will perform faster
 * in finding from extremely large number of tags but at
 * the same time it will less efficient in finding from
 * small number of tags .
 * @ param tagName
 * the name of the tag .
 * @ param fromTags
 * from which the findings to be done .
 * @ return the collection of tags matching with the given tag name .
 * @ throws NullValueException
 * if the { @ code tagName } or { @ code fromTags }
 * is null
 * @ since 3.0.0
 * @ author WFF */
public static Collection < AbstractHtml > findTagsByTagName ( final boolean parallel , final String tagName , final AbstractHtml ... fromTags ) throws NullValueException { } }

implementation: if ( tagName == null ) { throw new NullValueException ( "The tagName should not be null" ) ; } if ( fromTags == null ) { throw new NullValueException ( "The fromTags should not be null" ) ; } final Collection < Lock > locks = getReadLocks ( fromTags ) ; for ( final Lock lock : locks ) { lock . lock ( ) ; } try { return getAllNestedChildrenIncludingParent ( parallel , fromTags ) . filter ( child -> { return tagName . equals ( child . getTagName ( ) ) ; } ) . collect ( Collectors . toSet ( ) ) ; } finally { for ( final Lock lock : locks ) { lock . unlock ( ) ; } }


signature:
public class TagRepository { /** * Finds and returns the collection of attributes ( including from nested
 * tags ) of the tags matching with the give tag name .
 * @ param tagName
 * the name of the tag .
 * @ param fromTags
 * from which the findings to be done .
 * @ return the collection of attributes of the tags matching with the given
 * tag name .
 * @ throws NullValueException
 * if the { @ code tagName } or { @ code fromTags }
 * is null
 * @ since 2.1.11
 * @ author WFF */
public static Collection < AbstractAttribute > findAttributesByTagName ( final String tagName , final AbstractHtml ... fromTags ) throws NullValueException { } }

implementation: return findAttributesByTagName ( false , tagName , fromTags ) ;


signature:
public class TagRepository { /** * Finds and returns the collection of attributes ( including from nested
 * tags ) of the tags by the given filter .
 * @ param filter
 * the filter lambda expression containing return true
 * to include and false to exclude .
 * @ param fromTags
 * from which the findings to be done .
 * @ return the collection of attributes of the tags by the given filter .
 * @ throws NullValueException
 * if the { @ code filter } or { @ code fromTags }
 * is null
 * @ since 3.0.0
 * @ author WFF */
public static Collection < AbstractAttribute > findAttributesByAttributeFilter ( final Predicate < ? super AbstractAttribute > filter , final AbstractHtml ... fromTags ) throws NullValueException { } }

implementation: return findAttributesByAttributeFilter ( false , filter , fromTags ) ;


signature:
public class TagRepository { /** * Finds and returns the collection of attributes ( including from nested
 * tags ) of the tags by the given filter .
 * @ param parallel
 * true to internally use parallel stream . If true it
 * will split the finding task to different batches and
 * will execute the batches in different threads in
 * parallel consuming all CPUs . It will perform faster
 * in finding from extremely large number of tags but at
 * the same time it will less efficient in finding from
 * small number of tags .
 * @ param filter
 * the filter lambda expression containing return true
 * to include and false to exclude .
 * @ param fromTags
 * from which the findings to be done .
 * @ return the collection of attributes of the tags by the given filter .
 * @ throws NullValueException
 * if the { @ code filter } or { @ code fromTags }
 * is null
 * @ since 3.0.0
 * @ author WFF */
public static Collection < AbstractAttribute > findAttributesByAttributeFilter ( final boolean parallel , final Predicate < ? super AbstractAttribute > filter , final AbstractHtml ... fromTags ) throws NullValueException { } }

implementation: if ( filter == null ) { throw new NullValueException ( "The tagName should not be null" ) ; } if ( fromTags == null ) { throw new NullValueException ( "The fromTags should not be null" ) ; } final Collection < Lock > locks = getReadLocks ( fromTags ) ; for ( final Lock lock : locks ) { lock . lock ( ) ; } try { return getAllNestedChildrenIncludingParent ( parallel , fromTags ) . filter ( child -> { return child . getAttributes ( ) != null ; } ) . map ( child -> { return child . getAttributes ( ) ; } ) . flatMap ( attributes -> attributes . stream ( ) ) . filter ( filter ) . collect ( Collectors . toSet ( ) ) ; } finally { for ( final Lock lock : locks ) { lock . unlock ( ) ; } }


signature:
public class TagRepository { /** * Finds and returns the collection of attributes ( including from nested
 * tags ) of the tags matching with the give tag name .
 * @ param parallel
 * true to internally use parallel stream . If true it
 * will split the finding task to different batches and
 * will execute the batches in different threads in
 * parallel consuming all CPUs . It will perform faster
 * in finding from extremely large number of tags but at
 * the same time it will less efficient in finding from
 * small number of tags .
 * @ param tagName
 * the name of the tag .
 * @ param fromTags
 * from which the findings to be done .
 * @ return the collection of attributes of the tags matching with the given
 * tag name .
 * @ throws NullValueException
 * if the { @ code tagName } or { @ code fromTags }
 * is null
 * @ since 3.0.0
 * @ author WFF */
public static Collection < AbstractAttribute > findAttributesByTagName ( final boolean parallel , final String tagName , final AbstractHtml ... fromTags ) throws NullValueException { } }

implementation: if ( tagName == null ) { throw new NullValueException ( "The tagName should not be null" ) ; } if ( fromTags == null ) { throw new NullValueException ( "The fromTags should not be null" ) ; } final Collection < Lock > locks = getReadLocks ( fromTags ) ; for ( final Lock lock : locks ) { lock . lock ( ) ; } try { return getAllNestedChildrenIncludingParent ( parallel , fromTags ) . filter ( child -> { return tagName . equals ( child . getTagName ( ) ) && child . getAttributes ( ) != null ; } ) . map ( child -> { return child . getAttributes ( ) ; } ) . flatMap ( attributes -> attributes . stream ( ) ) . collect ( Collectors . toSet ( ) ) ; } finally { for ( final Lock lock : locks ) { lock . unlock ( ) ; } }


signature:
public class TagRepository { /** * Finds and returns the collection of attributes ( including from nested
 * tags ) of the tags by the given filter
 * @ param filter
 * the filter lambda expression containing return true to
 * include and false to exclude .
 * @ return the collection of attributes of the tags by the given tag filter
 * @ throws NullValueException
 * if the { @ code filter } or { @ code fromTags }
 * is null
 * @ since 3.0.0
 * @ author WFF */
public static Collection < AbstractAttribute > findAttributesByTagFilter ( final Predicate < ? super AbstractHtml > filter , final AbstractHtml ... fromTags ) throws NullValueException { } }

implementation: return findAttributesByTagFilter ( false , filter , fromTags ) ;


signature:
public class TagRepository { /** * Finds and returns the first ( including the nested tags ) matching with the
 * given attribute name and value .
 * @ param attributeName
 * the name of the attribute .
 * @ param attributeValue
 * the value of the attribute
 * @ param fromTags
 * from which the findings to be done .
 * @ return the first matching tag with the given attribute name and value .
 * @ throws NullValueException
 * if the { @ code attributeName } ,
 * { @ code attributeValue } or { @ code fromTags }
 * is null
 * @ since 2.1.8
 * @ author WFF */
public static AbstractHtml findOneTagByAttribute ( final String attributeName , final String attributeValue , final AbstractHtml ... fromTags ) throws NullValueException { } }

implementation: return findOneTagByAttribute ( false , attributeName , attributeValue , fromTags ) ;


signature:
public class TagRepository { /** * Finds and returns the first ( including the nested tags ) matching with the
 * given attribute name and value .
 * @ param attributeName
 * the name of the attribute .
 * @ param attributeValue
 * the value of the attribute
 * @ param fromTags
 * from which the findings to be done .
 * @ return the first matching tag with the given attribute name and value .
 * @ throws NullValueException
 * if the { @ code attributeName } ,
 * { @ code attributeValue } or { @ code fromTags }
 * is null
 * @ since 3.0.0
 * @ author WFF */
public static AbstractHtml findOneTagByAttribute ( final boolean parallel , final String attributeName , final String attributeValue , final AbstractHtml ... fromTags ) throws NullValueException { } }

implementation: if ( attributeName == null ) { throw new NullValueException ( "The attributeName should not be null" ) ; } if ( attributeValue == null ) { throw new NullValueException ( "The attributeValue should not be null" ) ; } if ( fromTags == null ) { throw new NullValueException ( "The fromTags should not be null" ) ; } final Collection < Lock > locks = getReadLocks ( fromTags ) ; for ( final Lock lock : locks ) { lock . lock ( ) ; } try { final Stream < AbstractHtml > stream = getAllNestedChildrenIncludingParent ( parallel , fromTags ) ; final Optional < AbstractHtml > any = stream . filter ( child -> { final AbstractAttribute attr = child . getAttributeByName ( attributeName ) ; return attr != null && attributeValue . equals ( attr . getAttributeValue ( ) ) ; } ) . findAny ( ) ; if ( any . isPresent ( ) ) { return any . get ( ) ; } return null ; } finally { for ( final Lock lock : locks ) { lock . unlock ( ) ; } }


signature:
public class TagRepository { /** * Finds and returns the first ( including the nested tags ) matching with the
 * given tag name .
 * @ param tagName
 * the name of the tag .
 * @ param fromTags
 * from which the findings to be done .
 * @ return the first matching tag with the given tag name .
 * @ throws NullValueException
 * if the { @ code tagName } or { @ code fromTags }
 * is null
 * @ since 2.1.11
 * @ author WFF */
public static AbstractHtml findOneTagByTagName ( final String tagName , final AbstractHtml ... fromTags ) throws NullValueException { } }

implementation: return findOneTagByTagName ( false , tagName , fromTags ) ;


signature:
public class TagRepository { /** * Finds and returns the first matching ( including from nested tags ) tag
 * ( which is assignable to the given tag class ) . < br >
 * < br >
 * < pre >
 * < code >
 * Html html = new Html ( null ) { {
 * new Head ( this ) { {
 * new TitleTag ( this ) { {
 * new NoTag ( this , " some title " ) ;
 * new Body ( this , new Id ( " one " ) ) { {
 * new Div ( this ) ;
 * TitleTag titleTag = TagRepository . findOneTagAssignableToTagClass ( TitleTag . class , html ) ;
 * System . out . println ( titleTag . getTagName ( ) ) ;
 * System . out . println ( titleTag . toHtmlString ( ) ) ;
 * / / prints
 * title
 * & lt ; title & gt ; some title & lt ; / title & gt ;
 * < / code >
 * < / pre >
 * @ param tagClass
 * the class of the tag .
 * @ param fromTags
 * from which the findings to be done .
 * @ return the first matching tag which is assignable to the given tag
 * class .
 * @ throws NullValueException
 * if the { @ code tagClass } or
 * { @ code fromTags } is null
 * @ throws InvalidTagException
 * if the given tag class is NoTag . class
 * @ since 2.1.11
 * @ author WFF */
public static < T extends AbstractHtml > T findOneTagAssignableToTag ( final Class < T > tagClass , final AbstractHtml ... fromTags ) throws NullValueException , InvalidTagException { } }

implementation: return findOneTagAssignableToTag ( false , tagClass , fromTags ) ;


signature:
public class TagRepository { /** * Finds and returns the first matching ( including from nested tags ) tag
 * ( which is assignable to the given tag class ) . < br >
 * < br >
 * < pre >
 * < code >
 * Html html = new Html ( null ) { {
 * new Head ( this ) { {
 * new TitleTag ( this ) { {
 * new NoTag ( this , " some title " ) ;
 * new Body ( this , new Id ( " one " ) ) { {
 * new Div ( this ) ;
 * TitleTag titleTag = TagRepository . findOneTagAssignableToTagClass ( TitleTag . class , html ) ;
 * System . out . println ( titleTag . getTagName ( ) ) ;
 * System . out . println ( titleTag . toHtmlString ( ) ) ;
 * / / prints
 * title
 * & lt ; title & gt ; some title & lt ; / title & gt ;
 * < / code >
 * < / pre >
 * @ param parallel
 * true to internally use parallel stream . If true it
 * will split the finding task to different batches and
 * will execute the batches in different threads in
 * parallel consuming all CPUs . It will perform faster
 * in finding from extremely large number of tags but at
 * the same time it will less efficient in finding from
 * small number of tags .
 * @ param tagClass
 * the class of the tag .
 * @ param fromTags
 * from which the findings to be done .
 * @ return the first matching tag which is assignable to the given tag
 * class .
 * @ throws NullValueException
 * if the { @ code tagClass } or
 * { @ code fromTags } is null
 * @ throws InvalidTagException
 * if the given tag class is NoTag . class
 * @ since 3.0.0
 * @ author WFF */
@ SuppressWarnings ( "unchecked" ) public static < T extends AbstractHtml > T findOneTagAssignableToTag ( final boolean parallel , final Class < T > tagClass , final AbstractHtml ... fromTags ) throws NullValueException , InvalidTagException { } }

implementation: if ( tagClass == null ) { throw new NullValueException ( "The tagClass should not be null" ) ; } if ( NoTag . class . isAssignableFrom ( tagClass ) ) { throw new InvalidTagException ( "classes like NoTag.class cannot be used to find tags as it's not a logical tag in behaviour." ) ; } if ( fromTags == null ) { throw new NullValueException ( "The fromTags should not be null" ) ; } final Collection < Lock > locks = getReadLocks ( fromTags ) ; for ( final Lock lock : locks ) { lock . lock ( ) ; } try { final Optional < AbstractHtml > any = getAllNestedChildrenIncludingParent ( parallel , fromTags ) . filter ( child -> tagClass . isAssignableFrom ( child . getClass ( ) ) && ! NoTag . class . isAssignableFrom ( child . getClass ( ) ) ) . findAny ( ) ; if ( any . isPresent ( ) ) { return ( T ) any . get ( ) ; } return null ; } finally { for ( final Lock lock : locks ) { lock . unlock ( ) ; } }


signature:
public class TagRepository { /** * Finds and returns the all matching ( including from nested tags ) tags
 * ( which is assignable to the given tag class ) . < br >
 * < br >
 * < pre >
 * < code >
 * Html html = new Html ( null ) { {
 * new Head ( this ) { {
 * new TitleTag ( this ) { {
 * new NoTag ( this , " some title " ) ;
 * new Body ( this , new Id ( " one " ) ) { {
 * new Div ( this ) ;
 * new Div ( this ) { {
 * new Div ( this ) { {
 * new Div ( this ) ;
 * new Div ( this ) ;
 * Collection & lt ; Head & gt ; heads = TagRepository . findTagsAssignableToTag ( Head . class , html ) ;
 * Collection & lt ; Div & gt ; divs = TagRepository . findTagsAssignableToTag ( Div . class , html ) ;
 * System . out . println ( heads . size ( ) ) ;
 * System . out . println ( divs . size ( ) ) ;
 * / / prints
 * < / code >
 * < / pre >
 * @ param tagClass
 * the class of the tag .
 * @ param fromTags
 * from which the findings to be done .
 * @ return the all matching tags which is assignable to the given tag class .
 * @ throws NullValueException
 * if the { @ code tagClass } or
 * { @ code fromTags } is null
 * @ throws InvalidTagException
 * if the given tag class is NoTag . class
 * @ since 2.1.11
 * @ author WFF */
public static < T extends AbstractHtml > Collection < T > findTagsAssignableToTag ( final Class < T > tagClass , final AbstractHtml ... fromTags ) throws NullValueException , InvalidTagException { } }

implementation: return findTagsAssignableToTag ( false , tagClass , fromTags ) ;


signature:
public class TagRepository { /** * Finds and returns the all matching ( including from nested tags ) tags
 * ( which is assignable to the given tag class ) . < br >
 * < br >
 * < pre >
 * < code >
 * Html html = new Html ( null ) { {
 * new Head ( this ) { {
 * new TitleTag ( this ) { {
 * new NoTag ( this , " some title " ) ;
 * new Body ( this , new Id ( " one " ) ) { {
 * new Div ( this ) ;
 * new Div ( this ) { {
 * new Div ( this ) { {
 * new Div ( this ) ;
 * new Div ( this ) ;
 * Collection & lt ; Head & gt ; heads = TagRepository . findTagsAssignableToTag ( Head . class , html ) ;
 * Collection & lt ; Div & gt ; divs = TagRepository . findTagsAssignableToTag ( Div . class , html ) ;
 * System . out . println ( heads . size ( ) ) ;
 * System . out . println ( divs . size ( ) ) ;
 * / / prints
 * < / code >
 * < / pre >
 * @ param parallel
 * true to internally use parallel stream . If true it
 * will split the finding task to different batches and
 * will execute the batches in different threads in
 * parallel consuming all CPUs . It will perform faster
 * in finding from extremely large number of tags but at
 * the same time it will less efficient in finding from
 * small number of tags .
 * @ param tagClass
 * the class of the tag .
 * @ param fromTags
 * from which the findings to be done .
 * @ return the all matching tags which is assignable to the given tag class .
 * @ throws NullValueException
 * if the { @ code tagClass } or
 * { @ code fromTags } is null
 * @ throws InvalidTagException
 * if the given tag class is NoTag . class
 * @ since 3.0.0
 * @ author WFF */
@ SuppressWarnings ( "unchecked" ) public static < T extends AbstractHtml > Collection < T > findTagsAssignableToTag ( final boolean parallel , final Class < T > tagClass , final AbstractHtml ... fromTags ) throws NullValueException , InvalidTagException { } }

implementation: if ( tagClass == null ) { throw new NullValueException ( "The tagClass should not be null" ) ; } if ( NoTag . class . isAssignableFrom ( tagClass ) ) { throw new InvalidTagException ( "classes like NoTag.class cannot be used to find tags as it's not a logical tag in behaviour." ) ; } if ( fromTags == null ) { throw new NullValueException ( "The fromTags should not be null" ) ; } final Collection < Lock > locks = getReadLocks ( fromTags ) ; for ( final Lock lock : locks ) { lock . lock ( ) ; } try { return ( Collection < T > ) getAllNestedChildrenIncludingParent ( parallel , fromTags ) . filter ( tag -> { return tagClass . isAssignableFrom ( tag . getClass ( ) ) && ! NoTag . class . isAssignableFrom ( tag . getClass ( ) ) ; } ) . collect ( Collectors . toSet ( ) ) ; } finally { for ( final Lock lock : locks ) { lock . unlock ( ) ; } }


signature:
public class TagRepository { /** * Finds and returns the first ( including the nested tags ) matching with the
 * given attribute name .
 * @ param attributeName
 * the name of the attribute .
 * @ param fromTags
 * from which the findings to be done .
 * @ return the first matching tag with the given attribute name and value .
 * @ throws NullValueException
 * if the { @ code attributeName } or
 * { @ code fromTags } is null
 * @ since 2.1.8
 * @ author WFF */
public static AbstractHtml findOneTagByAttributeName ( final String attributeName , final AbstractHtml ... fromTags ) throws NullValueException { } }

implementation: return findOneTagByAttributeName ( false , attributeName , fromTags ) ;


signature:
public class TagRepository { /** * Finds and returns the first ( including the nested tags ) matching with the
 * given attribute name .
 * @ param parallel
 * true to internally use parallel stream . If true
 * it will split the finding task to different
 * batches and will execute the batches in
 * different threads in parallel consuming all
 * CPUs . It will perform faster in finding from
 * extremely large number of tags but at the same
 * time it will less efficient in finding from
 * small number of tags .
 * @ param attributeName
 * the name of the attribute .
 * @ param fromTags
 * from which the findings to be done .
 * @ return the first matching tag with the given attribute name and value .
 * @ throws NullValueException
 * if the { @ code attributeName } or
 * { @ code fromTags } is null
 * @ since 3.0.0
 * @ author WFF */
public static AbstractHtml findOneTagByAttributeName ( final boolean parallel , final String attributeName , final AbstractHtml ... fromTags ) throws NullValueException { } }

implementation: if ( attributeName == null ) { throw new NullValueException ( "The attributeName should not be null" ) ; } if ( fromTags == null ) { throw new NullValueException ( "The fromTags should not be null" ) ; } final Collection < Lock > locks = getReadLocks ( fromTags ) ; for ( final Lock lock : locks ) { lock . lock ( ) ; } try { final Optional < AbstractHtml > any = getAllNestedChildrenIncludingParent ( parallel , fromTags ) . filter ( child -> { return child . getAttributeByName ( attributeName ) != null ; } ) . findAny ( ) ; if ( any . isPresent ( ) ) { return any . get ( ) ; } return null ; } finally { for ( final Lock lock : locks ) { lock . unlock ( ) ; } }


signature:
public class TagRepository { /** * Finds and returns the collection of tags ( including the nested tags )
 * matching with the given attribute name .
 * @ param attributeName
 * the name of the attribute .
 * @ param fromTags
 * from which the findings to be done .
 * @ return the collection of tags matching with the given attribute .
 * @ throws NullValueException
 * if the { @ code attributeName } or
 * { @ code fromTags } is null
 * @ since 2.1.8
 * @ author WFF */
public static Collection < AbstractHtml > findTagsByAttributeName ( final String attributeName , final AbstractHtml ... fromTags ) throws NullValueException { } }

implementation: return findTagsByAttributeName ( false , attributeName , fromTags ) ;


signature:
public class TagRepository { /** * Finds and returns the collection of tags ( including the nested tags )
 * matching with the given attribute name .
 * @ param parallel
 * true to internally use parallel stream . If true
 * it will split the finding task to different
 * batches and will execute the batches in
 * different threads in parallel consuming all
 * CPUs . It will perform faster in finding from
 * extremely large number of tags but at the same
 * time it will less efficient in finding from
 * small number of tags .
 * @ param attributeName
 * the name of the attribute .
 * @ param fromTags
 * from which the findings to be done .
 * @ return the collection of tags matching with the given attribute .
 * @ throws NullValueException
 * if the { @ code attributeName } or
 * { @ code fromTags } is null
 * @ since 3.0.0
 * @ author WFF */
public static Collection < AbstractHtml > findTagsByAttributeName ( final boolean parallel , final String attributeName , final AbstractHtml ... fromTags ) throws NullValueException { } }

implementation: if ( attributeName == null ) { throw new NullValueException ( "The attributeName should not be null" ) ; } if ( fromTags == null ) { throw new NullValueException ( "The fromTags should not be null" ) ; } final Collection < Lock > locks = getReadLocks ( fromTags ) ; for ( final Lock lock : locks ) { lock . lock ( ) ; } try { return getAllNestedChildrenIncludingParent ( parallel , fromTags ) . filter ( child -> { return child . getAttributeByName ( attributeName ) != null ; } ) . collect ( Collectors . toSet ( ) ) ; } finally { for ( final Lock lock : locks ) { lock . unlock ( ) ; } }


signature:
public class TagRepository { /** * Finds and returns the collection of tags ( including the nested tags )
 * matching with the given attribute name .
 * @ param parallel
 * true to internally use parallel stream . If true
 * it will split the finding task to different
 * batches and will execute the batches in
 * different threads in parallel consuming all
 * CPUs . It will perform faster in finding from
 * extremely large number of tags but at the same
 * time it will less efficient in finding from
 * small number of tags .
 * @ param attributeName
 * the name of the attribute .
 * @ return the collection of tags matching with the given attribute .
 * @ throws NullValueException
 * if the { @ code attributeName } is null
 * @ since 3.0.0
 * @ author WFF */
public Collection < AbstractHtml > findTagsByAttributeName ( final boolean parallel , final String attributeName ) throws NullValueException { } }

implementation: if ( attributeName == null ) { throw new NullValueException ( "The attributeName should not be null" ) ; } final Collection < Lock > locks = getReadLocks ( rootTags ) ; for ( final Lock lock : locks ) { lock . lock ( ) ; } try { return buildAllTagsStream ( parallel ) . filter ( tag -> { return tag . getAttributeByName ( attributeName ) != null ; } ) . collect ( Collectors . toSet ( ) ) ; } finally { for ( final Lock lock : locks ) { lock . unlock ( ) ; } }


signature:
public class TagRepository { /** * Finds and returns the collection of tags ( including the nested tags )
 * matching with the given attribute name and value .
 * @ param parallel
 * true to internally use parallel stream . If true
 * it will split the finding task to different
 * batches and will execute the batches in
 * different threads in parallel consuming all
 * CPUs . It will perform faster in finding from
 * extremely large number of tags but at the same
 * time it will less efficient in finding from
 * small number of tags .
 * @ param attributeName
 * the name of the attribute .
 * @ param attributeValue
 * the value of the attribute
 * @ return the collection of tags matching with the given attribute name and
 * value .
 * @ throws NullValueException
 * if the { @ code attributeName } or
 * { @ code attributeValue } is null
 * @ since 3.0.0
 * @ author WFF */
public Collection < AbstractHtml > findTagsByAttribute ( final boolean parallel , final String attributeName , final String attributeValue ) throws NullValueException { } }

implementation: if ( attributeName == null ) { throw new NullValueException ( "The attributeName should not be null" ) ; } if ( attributeValue == null ) { throw new NullValueException ( "The attributeValue should not be null" ) ; } final Collection < Lock > locks = getReadLocks ( rootTags ) ; for ( final Lock lock : locks ) { lock . lock ( ) ; } try { return buildAllTagsStream ( parallel ) . filter ( tag -> { final AbstractAttribute attribute = tag . getAttributeByName ( attributeName ) ; return attribute != null && attributeValue . equals ( attribute . getAttributeValue ( ) ) ; } ) . collect ( Collectors . toSet ( ) ) ; } finally { for ( final Lock lock : locks ) { lock . unlock ( ) ; } }


signature:
public class TagRepository { /** * Finds and returns the collection of tags ( including the nested tags )
 * matching with the give tag name and value .
 * @ param parallel
 * true to internally use parallel stream . If true it
 * will split the finding task to different batches and
 * will execute the batches in different threads in
 * parallel consuming all CPUs . It will perform faster
 * in finding from extremely large number of tags but at
 * the same time it will less efficient in finding from
 * small number of tags .
 * @ param tagName
 * the name of the tag .
 * @ return the collection of tags matching with the given tag name and
 * value .
 * @ throws NullValueException
 * if the { @ code tagName } is null
 * @ since 3.0.0
 * @ author WFF */
public Collection < AbstractHtml > findTagsByTagName ( final boolean parallel , final String tagName ) throws NullValueException { } }

implementation: if ( tagName == null ) { throw new NullValueException ( "The tagName should not be null" ) ; } final Collection < Lock > locks = getReadLocks ( rootTags ) ; for ( final Lock lock : locks ) { lock . lock ( ) ; } try { return buildAllTagsStream ( parallel ) . filter ( tag -> tagName . equals ( tag . getTagName ( ) ) ) . collect ( Collectors . toSet ( ) ) ; } finally { for ( final Lock lock : locks ) { lock . unlock ( ) ; } }


signature:
public class TagRepository { /** * Finds and returns the collection of tags ( including the nested tags but
 * excluding { @ code NoTag } ) filtered by the given filter .
 * @ param filter
 * the filter lambda expression containing return true to
 * include and false to exclude .
 * @ return the collection of tags by the given filter .
 * @ throws NullValueException
 * if the { @ code Predicate filter } is null
 * @ since 3.0.0
 * @ author WFF */
public Collection < AbstractHtml > findTagsByTagFilter ( final Predicate < ? super AbstractHtml > filter ) throws NullValueException { } }

implementation: return findTagsByTagFilter ( false , filter ) ;


signature:
public class TagRepository { /** * Finds and returns the collection of tags ( including the nested tags and
 * { @ code NoTag } ) filtered by the given filter .
 * @ param parallel
 * true to internally use parallel stream . If true it
 * will split the finding task to different batches and
 * will execute the batches in different threads in
 * parallel consuming all CPUs . It will perform faster
 * in finding from extremely large number of tags but at
 * the same time it will less efficient in finding from
 * small number of tags .
 * @ param filter
 * the filter lambda expression containing return true
 * to include and false to exclude .
 * @ return the collection of tags by the given filter .
 * @ throws NullValueException
 * if the { @ code Predicate filter } or
 * { @ code fromTags } is null
 * @ since 3.0.0
 * @ author WFF */
public static Collection < AbstractHtml > findTagsByTagFilter ( final boolean parallel , final Predicate < ? super AbstractHtml > filter , final AbstractHtml ... fromTags ) throws NullValueException { } }

implementation: if ( filter == null ) { throw new NullValueException ( "The filter should not be null" ) ; } if ( fromTags == null ) { throw new NullValueException ( "The fromTags should not be null" ) ; } final Collection < Lock > locks = getReadLocks ( fromTags ) ; for ( final Lock lock : locks ) { lock . lock ( ) ; } try { return getAllNestedChildrenIncludingParent ( parallel , fromTags ) . filter ( filter ) . collect ( Collectors . toSet ( ) ) ; } finally { for ( final Lock lock : locks ) { lock . unlock ( ) ; } }


signature:
public class TagRepository { /** * Finds and returns the collection of tags ( including the nested tags and
 * { @ code NoTag } ) filtered by the given filter .
 * @ param filter
 * the filter lambda expression containing return true to
 * include and false to exclude .
 * @ return the collection of tags matching with the given tag name and
 * value .
 * @ throws NullValueException
 * if the { @ code tagName } or { @ code fromTags }
 * is null
 * @ since 3.0.0
 * @ author WFF */
public static Collection < AbstractHtml > findTagsByTagFilter ( final Predicate < ? super AbstractHtml > filter , final AbstractHtml ... fromTags ) throws NullValueException { } }

implementation: if ( filter == null ) { throw new NullValueException ( "The filter should not be null" ) ; } return findTagsByTagFilter ( false , filter , fromTags ) ;


signature:
public class TagRepository { /** * Finds and returns the collection of attributes ( including from nested
 * tags ) of the tags matching with the give tag name .
 * @ param parallel
 * true to internally use parallel stream . If true it
 * will split the finding task to different batches and
 * will execute the batches in different threads in
 * parallel consuming all CPUs . It will perform faster
 * in finding from extremely large number of tags but at
 * the same time it will less efficient in finding from
 * small number of tags .
 * @ param tagName
 * the name of the tag .
 * @ return the collection of attributes of the tags matching with the given
 * tag name .
 * @ throws NullValueException
 * if the { @ code tagName } is null
 * @ since 3.0.0
 * @ author WFF */
public Collection < AbstractAttribute > findAttributesByTagName ( final boolean parallel , final String tagName ) throws NullValueException { } }

implementation: if ( tagName == null ) { throw new NullValueException ( "The tagName should not be null" ) ; } final Collection < Lock > locks = getReadLocks ( rootTags ) ; for ( final Lock lock : locks ) { lock . lock ( ) ; } try { final Stream < AbstractAttribute > attributesStream = buildAllTagsStream ( parallel ) . filter ( tag -> tagName . equals ( tag . getTagName ( ) ) && tag . getAttributes ( ) != null ) . map ( tag -> { return tag . getAttributes ( ) ; } ) . flatMap ( attributes -> attributes . stream ( ) ) ; return attributesStream . collect ( Collectors . toSet ( ) ) ; } finally { for ( final Lock lock : locks ) { lock . unlock ( ) ; } }


signature:
public class TagRepository { /** * Finds and returns the collection of attributes ( including from nested
 * tags ) of the tags filtered by the given filter
 * @ param filter
 * the filter lambda expression containing return true to
 * include and false to exclude .
 * @ return the collection of attributes by the given filter .
 * @ throws NullValueException
 * if the { @ code tagName } is null
 * @ since 3.0.0
 * @ author WFF */
public Collection < AbstractAttribute > findAttributesByAttributeFilter ( final Predicate < ? super AbstractAttribute > filter ) throws NullValueException { } }

implementation: return findAttributesByAttributeFilter ( false , filter ) ;


signature:
public class TagRepository { /** * Finds and returns the collection of attributes ( including from nested
 * tags ) of the tags filtered by the given filter
 * @ param parallel
 * true to internally use parallel stream . If true it
 * will split the finding task to different batches and
 * will execute the batches in different threads in
 * parallel consuming all CPUs . It will perform faster
 * in finding from extremely large number of tags but at
 * the same time it will less efficient in finding from
 * small number of tags .
 * @ param filter
 * the filter lambda expression containing return true
 * to include and false to exclude .
 * @ return the collection of attributes by the given filter .
 * @ throws NullValueException
 * if the { @ code tagName } is null
 * @ since 3.0.0
 * @ author WFF */
public Collection < AbstractAttribute > findAttributesByAttributeFilter ( final boolean parallel , final Predicate < ? super AbstractAttribute > filter ) throws NullValueException { } }

implementation: if ( filter == null ) { throw new NullValueException ( "The filter should not be null" ) ; } final Collection < Lock > locks = getReadLocks ( rootTags ) ; for ( final Lock lock : locks ) { lock . lock ( ) ; } try { final Stream < AbstractAttribute > attributesStream = buildAllTagsStream ( parallel ) . filter ( tag -> tag . getAttributes ( ) != null ) . map ( tag -> { return tag . getAttributes ( ) ; } ) . flatMap ( attributes -> attributes . stream ( ) ) ; return attributesStream . filter ( filter ) . collect ( Collectors . toSet ( ) ) ; } finally { for ( final Lock lock : locks ) { lock . unlock ( ) ; } }