builder.setType(PbJointType.GEAR); builder.setRatio(j.getRatio()); if (!argJointIndexMap.containsKey(j.getJoint1())) { throw new IllegalArgumentException("Joint 1 not in map"); int j1 = argJointIndexMap.get(j.getJoint1()); if (!argJointIndexMap.containsKey(j.getJoint2())) { throw new IllegalArgumentException("Joint 2 not in map");