/** * Returns a key identifying the market data with the specified ID and field name. * * @param id the ID of the quote * @param fieldName the field name of the market data record containing the quote data * @return a key identifying the market data with the specified ID and field name */ public static QuoteScenarioArrayId of(StandardId id, FieldName fieldName) { return new QuoteScenarioArrayId(QuoteId.of(id, fieldName)); }
/** * Obtains an instance used to obtain an observable value of the index. * <p> * The field name containing the data is {@link FieldName#MARKET_VALUE} and the market * data source is {@link ObservableSource#NONE}. * * @param index the index * @return the identifier */ public static IndexQuoteId of(Index index) { return new IndexQuoteId(index, FieldName.MARKET_VALUE, ObservableSource.NONE); }
@Override public LegalEntityInformation build() { return new LegalEntityInformation( legalEntityId, defaulted); }
/** * Obtains an instance used to obtain an observable value. * <p> * The market data source is {@link ObservableSource#NONE}. * * @param standardId the standard identifier of the data in the underlying data provider * @param fieldName the name of the field in the market data record holding the data * @return the identifier */ public static QuoteId of(StandardId standardId, FieldName fieldName) { return new QuoteId(standardId, fieldName, ObservableSource.NONE); }
/** * Obtains an instance from the quote identifier and value. * * @param quoteId the quote identifier * @param value the value for the given quote * @return the quote instance for the given values */ public static Quote of(QuoteId quoteId, double value) { return new Quote(quoteId, value); }
@Override public QuoteScenarioArray build() { return new QuoteScenarioArray( quotes); }
/** * Returns a key identifying the same market data as the quote key. * * @param quoteId key identifying the quote * @return a key identifying the same market data as the quote key */ public static QuoteScenarioArrayId of(QuoteId quoteId) { return new QuoteScenarioArrayId(quoteId); }
/** * Obtains an identifier used to find legal entity information. * * @param legalEntityId the name * @return the identifier */ public static LegalEntityInformationId of(StandardId legalEntityId) { return new LegalEntityInformationId(legalEntityId); }
@Override public BeanBuilder<? extends LegalEntityInformation> builder() { return new LegalEntityInformation.Builder(); }
@Override public BeanBuilder<? extends Quote> builder() { return new Quote.Builder(); }
/** * Obtains an instance used to obtain an observable value of the index, * specifying the source of observable market data. * * @param index the index * @param fieldName the name of the field in the market data record holding the data * @param obsSource the source of observable market data * @return the identifier */ public static IndexQuoteId of(Index index, FieldName fieldName, ObservableSource obsSource) { return new IndexQuoteId(index, fieldName, obsSource); }
/** * Creates an instance for a legal entity which has defaulted. * * @param legalEntityId the legal entity ID * @return the instance */ public static LegalEntityInformation isDefaulted(StandardId legalEntityId) { return new LegalEntityInformation(legalEntityId, true); }
/** * Obtains an instance used to obtain an observable value, * specifying the source of observable market data. * * @param standardId the standard identifier of the data in the underlying data provider * @param fieldName the name of the field in the market data record holding the data * @param obsSource the source of observable market data * @return the identifier */ public static QuoteId of(StandardId standardId, FieldName fieldName, ObservableSource obsSource) { return new QuoteId(standardId, fieldName, obsSource); }
@Override public Quote build() { return new Quote( quoteId, value); }
/** * Obtains an instance wrapping a set of quotes. * * @param quotes the quotes * @return an instance wrapping a set of quotes */ public static QuoteScenarioArray of(DoubleArray quotes) { return new QuoteScenarioArray(quotes); }
@Override public QuoteScenarioArrayId build() { return new QuoteScenarioArrayId( id); }
/** * Obtains an instance used to obtain an observable value of the index. * <p> * The market data source is {@link ObservableSource#NONE}. * * @param index the index * @param fieldName the name of the field in the market data record holding the data * @return the identifier */ public static IndexQuoteId of(Index index, FieldName fieldName) { return new IndexQuoteId(index, fieldName, ObservableSource.NONE); }
/** * Creates an instance for a legal entity which has not defaulted. * * @param legalEntityId the legal entity * @return the instance */ public static LegalEntityInformation isNotDefaulted(StandardId legalEntityId) { return new LegalEntityInformation(legalEntityId, false); }
/** * Obtains an instance used to obtain an observable value. * <p> * The field name containing the data is {@link FieldName#MARKET_VALUE} and the market * data source is {@link ObservableSource#NONE}. * * @param standardId the standard identifier of the data in the underlying data provider * @return the identifier */ public static QuoteId of(StandardId standardId) { return new QuoteId(standardId, FieldName.MARKET_VALUE, ObservableSource.NONE); }
@Override public IndexQuoteId withObservableSource(ObservableSource obsSource) { return new IndexQuoteId(index, fieldName, obsSource); }