From cb01b886dc8fb6a423729e378f1de0afa5e64ad3 Mon Sep 17 00:00:00 2001 From: 7u83 <7u83@maiil.ru> Date: Sat, 29 Dec 2018 21:01:30 +0100 Subject: [PATCH] More functions defined in interface --- src/opensesim/world/Asset.java | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/opensesim/world/Asset.java b/src/opensesim/world/Asset.java index 0fac048..c296fdd 100644 --- a/src/opensesim/world/Asset.java +++ b/src/opensesim/world/Asset.java @@ -26,7 +26,7 @@ package opensesim.world; /** - * + * Asset interface * @author 7u83 <7u83@mail.ru> */ public interface Asset { @@ -37,4 +37,28 @@ public interface Asset { */ public int getDecimals(); + /** + * Get the type name of asset. eg. Currency, Future or Stock + * @return type name + */ + public String getTypeName(); + + /** + * Get symbol for this asset. eg. USD + * @return symbol + */ + public String getSymbol(); + + /** + * Determine if this asset can be used as currency + * @return true if asset can act as currency, false if not. + */ + public boolean isCurrency(); + + /** + * Can this asset act as asset? + * @return true if yes, false if not + */ + public boolean isAsset(); + }