Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide human-readable summaries #1626

Merged
merged 2 commits into from Dec 15, 2017
Merged

Provide human-readable summaries #1626

merged 2 commits into from Dec 15, 2017

Conversation

jodastephen
Copy link
Member

Add basic structure for Trades and Positions

Add basic structure for Trades and Positions
@PropertyDefinition(validate = "notNull")
private final PortfolioItemType portfolioItemType;
/**
* The type of the item.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be "...the item's product"?

/**
* The description of the item.
*/
@PropertyDefinition(validate = "notNull")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be empty? Should it be notBlank?

* <p>
* This allows trades and positions to be separated.
*/
public enum PortfolioItemType implements NamedEnum {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth having a value for SENSITIVITIES? We know we have those in our portfolios. Or are we OK with them being OTHER?

/**
* A {@link FxSingleBarrierOption}.
*/
public static final ProductType FX_SINGLE_BARRIER_OPTION = ProductType.of("FxSingleBarrierOption", "FX Single Barrier");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the description include "Option"?

*/
private ProductType(String name, String description) {
super(name);
this.description = ArgChecker.notEmpty(description, "description");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

notBlank? notEmpty allows a string with nothing but whitespace.

this.description = ArgChecker.notEmpty(description, "description");
}

public String getDescription() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Javadoc

@jodastephen jodastephen merged commit 49a117e into master Dec 15, 2017
@jodastephen jodastephen deleted the topic/summary1 branch December 15, 2017 16:47
@jodastephen jodastephen added this to the v1.7 milestone Dec 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants