package org.goko.core.gcode.rs274ngcv3.instruction; import org.goko.core.common.exception.GkException; import org.goko.core.gcode.rs274ngcv3.context.GCodeContext; import org.goko.core.gcode.rs274ngcv3.element.InstructionType; public class DwellInstruction extends AbstractInstruction { /** The time to pause */ private int seconds; /** Constructor */ public DwellInstruction(int seconds) { super(InstructionType.DWELL); this.seconds = seconds; } /** (inheritDoc) * @see org.goko.core.gcode.element.IInstruction#apply(org.goko.core.gcode.rs274ngcv3.context.GCodeContext) */ @Override public void apply(GCodeContext context) throws GkException { // TODO Auto-generated method stub } /** * @return the seconds */ public int getSeconds() { return seconds; } /** (inheritDoc) * @see java.lang.Object#hashCode() */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + seconds; return result; } /** (inheritDoc) * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; DwellInstruction other = (DwellInstruction) obj; if (seconds != other.seconds) return false; return true; } }