Class ObjectProxy<T,​V>

  • Type Parameters:
    T - type
    V - value
    All Implemented Interfaces:
    Map<T,​V>, IExternalizable

    public class ObjectProxy<T,​V>
    extends Object
    implements Map<T,​V>, IExternalizable
    Flex ObjectProxy compatibility class.
    Author:
    The Red5 Project, Joachim Bauch (jojo@struktur.de)
    See Also:
    ObjectProxy
    • Constructor Detail

      • ObjectProxy

        public ObjectProxy()
        Create new empty proxy.
      • ObjectProxy

        public ObjectProxy​(Map<T,​V> item)
        Create proxy for given object.
        Parameters:
        item - object to proxy
    • Method Detail

      • readExternal

        public void readExternal​(IDataInput input)
        Load custom object from stream.
        Specified by:
        readExternal in interface IExternalizable
        Parameters:
        input - object to be used for data loading
      • writeExternal

        public void writeExternal​(IDataOutput output)
        Store custom object to stream.
        Specified by:
        writeExternal in interface IExternalizable
        Parameters:
        output - object to be used for data storing
      • toString

        public String toString()
        Return string representation of the proxied object.
        Overrides:
        toString in class Object
        Returns:
        string
      • clear

        public void clear()
        Specified by:
        clear in interface Map<T,​V>
      • containsKey

        public boolean containsKey​(Object name)
        Check if proxied object has a given property.
        Specified by:
        containsKey in interface Map<T,​V>
        Parameters:
        name - name
        Returns:
        boolean
      • get

        public V get​(Object name)
        Return the value of a property.
        Specified by:
        get in interface Map<T,​V>
        Parameters:
        name - name
        Returns:
        value
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface Map<T,​V>
      • keySet

        public Set<T> keySet()
        Specified by:
        keySet in interface Map<T,​V>
      • put

        public V put​(T name,
                     V value)
        Change a property of the proxied object.
        Specified by:
        put in interface Map<T,​V>
        Parameters:
        name - name
        value - value
        Returns:
        old value
      • putAll

        public void putAll​(Map values)
        Specified by:
        putAll in interface Map<T,​V>
      • remove

        public V remove​(Object name)
        Remove a property from the proxied object.
        Specified by:
        remove in interface Map<T,​V>
        Parameters:
        name - name
        Returns:
        old value
      • size

        public int size()
        Specified by:
        size in interface Map<T,​V>
      • getUid

        public String getUid()
        Returns:
        the uid
      • setUid

        public void setUid​(String uid)
        Parameters:
        uid - the uid to set
      • getType

        public Object getType()
        Returns:
        the type
      • setType

        public void setType​(Object type)
        Parameters:
        type - the type to set