public void setName ( String name ) { if ( name . endsWith ( ARRAY_SUFFIX ) ) { this . name = name . substring ( 0 , name . length ( ) - 2 ) ; type = ItemType . ARRAY ; } else if ( name . endsWith ( MAP_SUFFIX ) ) { this . name = name . substring ( 0 , name . length ( ) - 2 ) ; type = ItemType . MAP ; } else { this . name = name ; if ( type == null ) { type = ItemType . SINGLE ; } } }
Sets the name of the item .