private int getTagIndex ( final String tag ) { if ( tag == null ) { return 0 ; } else { int index = knownTags . indexOf ( tag ) ; return index == - 1 ? knownTags . size ( ) + 1 : index + 1 ; } }
Gets the index of a tag .