Skip to content

Instantly share code, notes, and snippets.

@GLitchfield
Created January 7, 2014 20:13
Show Gist options
  • Save GLitchfield/8306087 to your computer and use it in GitHub Desktop.
Save GLitchfield/8306087 to your computer and use it in GitHub Desktop.
public interface MetadataService {
/**
*
*/
interface Result<V extends Metadata> extends Existential {
SearchContext context();
Map<String, List<V>> results();
@Override
boolean isNull();
}
/**
*
*/
interface SearchContext extends Existential {
@Override
boolean isNull();
static SearchContext NULL = new SearchContext() {
@Override
public boolean isNull() {
return true;
}
};
}
/**
* PROPOSED NEW METHOD
*
* @param ids
* @return
*/
Observable<Map<InstrumentID, Instrument>> instrument(InstrumentID... ids);
/**
*
* @param symbols
* @return
*/
Observable<Result<Instrument>> instrument(String... symbols);
/**
*
* @param ctx
* @param symbols
* @return
*/
Observable<Result<Instrument>> instrument(SearchContext ctx, String... symbols);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment