Adds sub-authority:a principal relative to the IdentifierAuthority.

@param sub sub-authority.
@return the current SID instance.
345649
public SID addSubAuthority(byte[] sub) {
        if (sub == null || sub.length != 4) {
            throw new IllegalArgumentException("Invalid sub-authority to be added");
        }

        this.subAuthorities.add(Arrays.copyOf(sub, sub.length));
        return this;
    }
462939
def remove_sid2sub(self, sid, sub):
        
        self.remove('sub2sid', sub, sid)
        self.remove('sid2sub', sid, sub)
842070
public static void enableSubsystem(ISubsystem subsystem, boolean enable) {
        if (enable_logging) {
            if (enable) {
                mEnabledSubsystems.add(subsystem);
            } else {
                mEnabledSubsystems.remove(subsystem);
            }
        }
    }
823166
public SubCommandSet add(SubCommand<SubCommandDef> subCommand) {
        if (subCommandMap.containsKey(subCommand.getName())) {
            throw new IllegalArgumentException("SubCommand with name " + subCommand.getName() + " already exists");
        }
        this.subCommands.add(subCommand);
        this.subCommandMap.put(subCommand.getName(), subCommand);
        for (String alias : subCommand.getAliases()) {
            if (subCommandMap.containsKey(alias)) {
                throw new IllegalArgumentException("SubCommand (" + subCommand.getName() + ") alias " + alias + " already exists");
            }
            this.subCommandMap.put(alias, subCommand);
        }
        return this;
    }
1083771
def __sub_add_reference(self, key):
        """"""
        new_subs = self.__new_subs
        with new_subs:
            # don't allow multiple subscription requests to overwrite internal reference
            if key in new_subs:
                raise ValueError('subscription for given args pending: %s' % str(key))
            new_subs[key] = None
        try:
            yield
        except:
            # don't preserve reference if request creation failed
            with new_subs:
                new_subs.pop(key, None)
            raise
971926
def add(self, name, *args):
        """"""
        self._add(False, self.authority, name, *args)
592440
public OperatorSubtaskState putSubtaskStateByOperatorID(
		@Nonnull OperatorID operatorID,
		@Nonnull OperatorSubtaskState state) {

		return subtaskStatesByOperatorID.put(operatorID, Preconditions.checkNotNull(state));
	}
350594
public Evaluator sync(Map<String, List<Subscription>> subs) {
    Set<String> removed = subscriptions.keySet();
    removed.removeAll(subs.keySet());
    removed.forEach(this::removeGroupSubscriptions);
    subs.forEach(this::addGroupSubscriptions);
    return this;
  }
396610
public boolean isSuperAdmin(UserIdentityContext userIdentityContext) {
        //SuperAdmin Account is the one the is
        //1. Has no parent, this is the top account
        //2. Is ACTIVE
        return (userIdentityContext.getEffectiveAccount().getParentSid() == null)
                && (userIdentityContext.getEffectiveAccount().getStatus().equals(Account.Status.ACTIVE));
    }
73502
@Override
	public RandomVariable sub(RandomVariable randomVariable) {
		return apply(OperatorType.SUB, new RandomVariable[]{this, randomVariable});
	}
1214077
void addSubsystem(final OperationTransformerRegistry registry, final String name, final ModelVersion version) {
        final OperationTransformerRegistry profile = registry.getChild(PathAddress.pathAddress(PROFILE));
        final OperationTransformerRegistry server = registry.getChild(PathAddress.pathAddress(HOST, SERVER));
        final PathAddress address = PathAddress.pathAddress(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, name));
        subsystem.mergeSubtree(profile, Collections.singletonMap(address, version));
        if(server != null) {
            subsystem.mergeSubtree(server, Collections.singletonMap(address, version));
        }
    }
1304682
void signedSubtract(MutableBigInteger addend) {
        if (sign == 1)
            sign = sign * subtract(addend);
        else
            add(addend);
        if (intLen == 0)
             sign = 1;
    }
223837
@Override
    public IPermission newPermission(IAuthorizationPrincipal principal)
            throws AuthorizationException {
        return getAuthorizationService().newPermission(getOwner(), principal);
    }
647197
public SubscriptionEnvelope getSubscription(String subId) throws ApiException {
        ApiResponse<SubscriptionEnvelope> resp = getSubscriptionWithHttpInfo(subId);
        return resp.getData();
    }
948936
def _str_sid(self):
    ''
    sub_auths = "-".join([str(sub) for sub in self.sub_authorities])
    return f'S-{self.revision_number}-{self.authority}-{sub_auths}'
92303
public void addSubsystemFileSource(String subsystemFileName, File zipFile, ZipEntry zipEntry) {
       inputStreamSourceMap.put(subsystemFileName, new ZipEntryInputStreamSource(zipFile, zipEntry));
    }
1221036
def add_sub_resource(self, relative_id, sub_resource):
        """"""
        existing_sub_resources = self.resources.get(sub_resource.RELATIVE_PATH_TEMPLATE, defaultdict(list))
        existing_sub_resources[relative_id].append(sub_resource)
        self.resources.update({sub_resource.RELATIVE_PATH_TEMPLATE: existing_sub_resources})