Example #1
0
	@Override
	public void setMoney(final double value)
	{
		if (Methods.hasMethod())
		{
			try
			{
				final Method method = Methods.getMethod();
				if (!method.hasAccount(this.getName()))
				{
					throw new Exception();
				}
				final Method.MethodAccount account = Methods.getMethod().getAccount(this.getName());
				account.set(value);
			}
			catch (Exception ex)
			{
			}
		}
		super.setMoney(value);
	}
Example #2
0
	@Override
	public double getMoney()
	{
		if (Methods.hasMethod())
		{
			try
			{
				final Method method = Methods.getMethod();
				if (!method.hasAccount(this.getName()))
				{
					throw new Exception();
				}
				final Method.MethodAccount account = Methods.getMethod().getAccount(this.getName());
				return account.balance();
			}
			catch (Exception ex)
			{
			}
		}
		return super.getMoney();
	}