All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.threerings.presents.tools.dobject_set.tmpl Maven / Gradle / Ivy

The newest version!
    /**
     * Requests that the specified entry be added to the
     * {{field}} set. The set will not change until the event is
     * actually propagated through the system.
     */
    {{generated}}
    public void addTo{{upfield}} ({{etype}} elem)
    {
        requestEntryAdd({{capfield}}, {{field}}, elem);
    }

    /**
     * Requests that the entry matching the supplied key be removed from
     * the {{field}} set. The set will not change until the
     * event is actually propagated through the system.
     */
    {{generated}}
    public void removeFrom{{upfield}} (Comparable key)
    {
        requestEntryRemove({{capfield}}, {{field}}, key);
    }

    /**
     * Requests that the specified entry be updated in the
     * {{field}} set. The set will not change until the event is
     * actually propagated through the system.
     */
    {{generated}}
    public void update{{upfield}} ({{etype}} elem)
    {
        requestEntryUpdate({{capfield}}, {{field}}, elem{{transport}});
    }

    /**
     * Requests that the {{field}} field be set to the
     * specified value. Generally one only adds, updates and removes
     * entries of a distributed set, but certain situations call for a
     * complete replacement of the set value. The local value will be
     * updated immediately and an event will be propagated through the
     * system to notify all listeners that the attribute did
     * change. Proxied copies of this object (on clients) will apply the
     * value change when they received the attribute changed notification.
     */
    {{generated}}
    public void set{{upfield}} ({{type}} value)
    {
        requestAttributeChange({{capfield}}, value, this.{{field}});
        {{type}} clone = {{clonefield}};
        this.{{field}} = clone;
    }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy