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
Conversation
Add basic structure for Trades and Positions
@PropertyDefinition(validate = "notNull") | ||
private final PortfolioItemType portfolioItemType; | ||
/** | ||
* The type of the item. |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Javadoc
Add basic structure for Trades and Positions