HolonTransformer.java 728 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. package classes;
  2. public class HolonTransformer extends CpsObject {
  3. /* Ratio of the transformer */
  4. float transformRatio;
  5. /**
  6. * Constructor Set type of object (Transformer), its transform ratio and the
  7. * default name ("Transformer");
  8. */
  9. public HolonTransformer(String ObjName) {
  10. super(ObjName);
  11. }
  12. public HolonTransformer(HolonObject obj) {
  13. super(obj.objName);
  14. }
  15. /**
  16. * Set transform ratio
  17. *
  18. * @param ratio
  19. * desired ratio
  20. */
  21. public void setTransformRatio(float ratio) {
  22. this.transformRatio = ratio;
  23. }
  24. /**
  25. * Output the actual ratio of the transformer
  26. *
  27. * @return actual ratio of the transformer
  28. */
  29. public float getTransformRatio() {
  30. return this.transformRatio;
  31. }
  32. }