public Item(String name,String typeId){
  if (name != null) {
    this.name=name.replaceAll("\\s"," ");
  }
  if (typeId != null && typeId.length() > 0) {
    this.typeId=Integer.valueOf(typeId);
  }
  itemMap=new TreeMap<Integer,IItem>();
}

public Item ( String name , String typeId ) { if ( name != null ) { this . name = name . replaceAll ( "\\s" , " " ) ; } if ( typeId != null && typeId . length ( ) > 0 ) { this . typeId = Integer . valueOf ( typeId ) ; } itemMap = new TreeMap < Integer , IItem > ( ) ; }
creates an item with the given name and type id . creates an empty tree map to store items
