public void label ( String labelText , int index ) { if ( labelMap . containsKey ( labelText ) ) throw new IllegalArgumentException ( "Label \"" + labelText + "\" already exists." ) ; if ( labelMap . containsValue ( index ) ) throw new IllegalArgumentException ( "Index \"" + index + "\" already has a label." ) ; labelMap . put ( labelText , index ) ; }
Puts the given label for the given index .