legacy/src/main/java/thredds/catalog/InvDataset.java
public InvDatasetImpl findDatasetByName(String name) {
    for (InvDataset ds : getDatasets()) {
      if (ds.getName().equals(name))
        return (InvDatasetImpl) ds;
    }
    return null;
  }
public InvDatasetImpl findDatasetByName(String name) {
    for (InvDataset ds : getDatasets()) {
      if (ds.getName().equals(name))
        return (InvDatasetImpl) ds;
    }
    return null;
  }
public InvDatasetImpl findDatasetByName ( String name ) { for ( InvDataset ds : getDatasets ( ) ) { if ( ds . getName ( ) . equals ( name ) ) return ( InvDatasetImpl ) ds ; } return null ; }
Find an immediate child dataset by its name.

@param name match on this name
@return dataset if found or null if not exist.
Find an immediate child dataset by its name .