Class ContainerHandleVirtual

java.lang.Object
org.spongepowered.asm.launch.platform.container.ContainerHandleVirtual
All Implemented Interfaces:
IContainerHandle

public class ContainerHandleVirtual
extends java.lang.Object
implements IContainerHandle
A virtual container, used to marshal other containers around
  • Constructor Summary

    Constructors
    Constructor Description
    ContainerHandleVirtual​(java.lang.String name)
    .ctor
  • Method Summary

    Modifier and Type Method Description
    ContainerHandleVirtual add​(IContainerHandle nested)
    Add a nested container to this virtual container
    boolean equals​(java.lang.Object obj)  
    java.lang.String getAttribute​(java.lang.String name)
    Retrieve the value of attribute with the specified name, or null if not present
    java.util.Collection<IContainerHandle> getNestedContainers()
    Get nested containers from this container, allows a container to detect and return containers within itself.
    int hashCode()  
    ContainerHandleVirtual setAttribute​(java.lang.String key, java.lang.String value)
    Set a virtual attribute on this virtual container
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ContainerHandleVirtual

      public ContainerHandleVirtual​(java.lang.String name)
      .ctor
      Parameters:
      name - Unique container name
  • Method Details

    • setAttribute

      public ContainerHandleVirtual setAttribute​(java.lang.String key, java.lang.String value)
      Set a virtual attribute on this virtual container
      Parameters:
      key - attribute key
      value - attribute value
      Returns:
      fluent interface
    • add

      public ContainerHandleVirtual add​(IContainerHandle nested)
      Add a nested container to this virtual container
      Parameters:
      nested - Nested container to add
      Returns:
      fluent
    • getAttribute

      public java.lang.String getAttribute​(java.lang.String name)
      Description copied from interface: IContainerHandle
      Retrieve the value of attribute with the specified name, or null if not present
      Specified by:
      getAttribute in interface IContainerHandle
      Parameters:
      name - attribute name
      Returns:
      attribute value or null if not present
    • getNestedContainers

      public java.util.Collection<IContainerHandle> getNestedContainers()
      Description copied from interface: IContainerHandle
      Get nested containers from this container, allows a container to detect and return containers within itself. For example a folder container detecting and returning file containers, or a virtual container returning real containers after a scan.
      Specified by:
      getNestedContainers in interface IContainerHandle
    • equals

      public boolean equals​(java.lang.Object obj)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object