Creates a subject.
421180
function Subject() {
    __super__.call(this, subscribe);
    this.isDisposed = false,
    this.isStopped = false,
    this.observers = [];
    this.hasError = false;
  }
800153
def subject(self) -> Optional[UnstructuredHeader]:
        """"""
        try:
            return cast(UnstructuredHeader, self[b'subject'][0])
        except (KeyError, IndexError):
            return None
428975
private void addRolesToSubject(Subject subject, Set<String> userRoles) {
        if (userRoles == null) {
            userRoles = Collections.emptySet();
        }

        Map<String, Set<String>> attributes =
                SubjectUtils.getAttributes(subject);

        Set<String> roles = attributes.get(ROLE_KEY);
        if (roles == null) {
            roles = new HashSet<String>(userRoles);
            attributes.put(ROLE_KEY, roles);
        } else {
            roles.addAll(userRoles);
        }
        if (logger.isDebugEnabled()) {
            for (String role : userRoles) {
                logger.debug("added role: {}", role);
            }
        }
    }
1070664
private function createSubjectFromPage(PageInterface $page)
    {
        try {
            $url = $this->urlGenerator->generate($page->getRoute(), [], UrlGeneratorInterface::ABSOLUTE_URL);

            $subject = new Subject();
            $subject->title = $page->getSeo()->getTitle();
            $subject->url   = $url;

            return $subject;
        } catch (ExceptionInterface $e) {
        }

        return null;
    }
638067
private Controllable createTopicMBean(Controllable c) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "createPublicationPointMBean", new Object[] { c });
        TopicImpl pp = new TopicImpl(_me, c);
        controllableMap.put(c, pp);
        try {
            Dictionary<String, Object> properties = new Hashtable<String, Object>();
            properties.put("service.vendor", "IBM");
            String cName = c.getName();
            properties.put("jmx.objectname", "WebSphere:feature=wasJmsServer,type=Topic,name=" + cName);
            ServiceRegistration<TopicMBean> topicMBean = (ServiceRegistration<TopicMBean>) bcontext.registerService(TopicMBean.class.getName(), pp, properties);
            serviceObjects.put(cName, topicMBean);
        } catch (Exception e) {
            SibTr.exception(tc, e);
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "createPublicationPointMBean", new Object[] { pp });
        return pp;

    }
253147
def build_objects_by_subject
      @objects = []
      @objects_by_subject = {}

      @reader.statements_by_subject.each do |subject, statements|
        object = Grom::Node.new(statements, @decorators)
        @objects_by_subject[subject] = object
        @objects << object
      end

      self
    end
1247164
public function createSubject(Subject $subject)
    {
        $this->om->startFlushSuite();
        $this->om->persist($subject);
        $this->dispatch(new CreateSubjectEvent($subject));
        $this->om->endFlushSuite();

        return $subject;
    }
1046613
def add_subject(self, subject_id, attributes, parents=[],
            issuer='default'):
        
        # MAINT: consider test to avoid adding duplicate subject id
        assert isinstance(attributes, (dict)), "attributes expected to be dict"

        attrs = []
        for key in attributes.keys():
            attrs.append({
                'issuer': issuer,
                'name': key,
                'value': attributes[key]
                })

        body = {
            "subjectIdentifier": subject_id,
            "parents": parents,
            "attributes": attrs,
        }

        return self._put_subject(subject_id, body)
597444
public void add(SubjectObserver<T> subjectObserver)
   {
      if (subjectObserver == null)
         throw new RequiredException("subjectObserver in Topic.add");
      
      String id = subjectObserver.getId();
      
      if (id == null || id.length() == 0)
         throw new IllegalArgumentException("Subject observer id required");
      
     //get previous
      SubjectObserver<?> prev = (SubjectObserver<?>)observerMap.get(subjectObserver.getId());
      
      if(prev != null && prev != subjectObserver)
      {
         Debugger.println(this,"Object registered, but observer id already exists "+subjectObserver.getId()+" for subject="+this.name);
      }
      
      //add       
      observerMap.put(subjectObserver.getId(), subjectObserver);
      
   }
990915
@NonNull
    public EmailIntentBuilder subject(@NonNull String subject) {
        checkNotNull(subject);
        checkNoLineBreaks(subject);
        this.subject = subject;
        return this;
    }
738074
@Override
    public Builder subject(String username) throws InvalidClaimException {
        if (username != null && !username.isEmpty()) {

            claims.put(Claims.SUBJECT, username);
        } else {
            String err = Tr.formatMessage(tc, "JWT_INVALID_CLAIM_VALUE_ERR", new Object[] { Claims.SUBJECT, username });
            throw new InvalidClaimException(err);
        }
        return this;
    }
1204369
public function subject($subject)
	{
		if ($this->config['encode_headers'])
		{
			$subject = $this->encode_mimeheader((string) $subject);
		}
		$this->subject = (string) $subject;

		return $this;
	}
860803
public function subject($subject = null)
    {
        $headers = $this->headers();
        if (!func_num_args()) {
            return $headers['Subject'];
        }
        $headers['Subject'] = Mime::encodeValue($subject, 998, "\r\n ");
        return $this;
    }
293951
@Override
	public TopicSubscriber createSubscriber(Topic topic) throws JMSException
    {
        return createSubscriber(topic,null,false);
    }
825931
public function setSubject($subject)
	{
		self::validateSubject($subject, true);

		$this->model_class = $subject->className();
		$this->foreign_pk = $subject->getPrimaryKey(true);
		$this->subject = $subject;
	}
121821
def Set(self,
          subject,
          attribute,
          value,
          timestamp=None,
          replace=True,
          sync=True):
    """"""
    subject = utils.SmartUnicode(subject)

    _ = sync
    attribute = utils.SmartUnicode(attribute)

    if timestamp is None or timestamp == self.NEWEST_TIMESTAMP:
      timestamp = time.time() * 1000000

    if subject not in self.subjects:
      self.subjects[subject] = {}

    if replace or attribute not in self.subjects[subject]:
      self.subjects[subject][attribute] = []

    encoded_value = self._value_converter.Encode(attribute, value)
    self.subjects[subject][attribute].append([encoded_value, int(timestamp)])
    self.subjects[subject][attribute].sort(key=lambda x: x[1])
960266
public void addSubject(String[] subject) {
		XmpArray array = new XmpArray(XmpArray.UNORDERED);
		for (int i = 0; i < subject.length; i++) {
			array.add(subject[i]);
		}
		setProperty(SUBJECT, array);
	}