Update Compound.java

added accessor to compound