public static ItemObject[] getItemObjectsByType( int     type,
                                                   boolean includeEmptyItem ) {
    ItemObject[] result;
    Iterator<ItemObject> iterItems;
    ItemObject   itemObject;
    ArrayList<ItemObject> items = new ArrayList<ItemObject>();

    if ( type == ItemTypes.ALL ) {
      result = getAllItems();
    } // if
    else {
      iterItems = _itemList.iterator();
      while ( iterItems.hasNext() ) {

        itemObject = (ItemObject) iterItems.next();
        if ( itemObject != null ) {
          if ( itemObject.getItemType() == type ) {
            items.add( itemObject );
          } // if
        } // if

      } // while

      if ( includeEmptyItem ) {
        Collections.sort( items );
        items.add( 0, getEmptyItem() );
      } // if
      result = new ItemObject[items.size()];
      items.toArray( result );
    } // if

    return result;
  } // getItemObjectsByType ----------------------------------------------------