@ Nonnull public String getAsString ( final boolean bPrintZeroElements , final boolean bPrintAtLeastMajorAndMinor ) { // Build from back to front final StringBuilder aSB = new StringBuilder ( m_sQualifier != null ? m_sQualifier : "" ) ; if ( m_nMicro > 0 || aSB . length ( ) > 0 || bPrintZeroElements ) { // Micro version if ( aSB . length ( ) > 0 ) aSB . insert ( 0 , ' ' ) ; aSB . insert ( 0 , m_nMicro ) ; } if ( bPrintAtLeastMajorAndMinor || m_nMinor > 0 || aSB . length ( ) > 0 || bPrintZeroElements ) { // Minor version if ( aSB . length ( ) > 0 ) aSB . insert ( 0 , ' ' ) ; aSB . insert ( 0 , m_nMinor ) ; } if ( bPrintAtLeastMajorAndMinor || m_nMajor > 0 || aSB . length ( ) > 0 || bPrintZeroElements ) { // Major version if ( aSB . length ( ) > 0 ) aSB . insert ( 0 , ' ' ) ; aSB . insert ( 0 , m_nMajor ) ; } return aSB . length ( ) > 0 ? aSB . toString ( ) : DEFAULT_VERSION_STRING ; }
Get the string representation of the version number .