Package ucar.nc2

Class AttributeContainerHelper

java.lang.Object
ucar.nc2.AttributeContainerHelper
All Implemented Interfaces:
Iterable<Attribute>, AttributeContainer

@Deprecated public class AttributeContainerHelper extends Object implements AttributeContainer
Deprecated.
Use AttributeContainerMutable.
A mutable collection of Attributes.
Since:
5/5/2015
  • Constructor Details

    • AttributeContainerHelper

      public AttributeContainerHelper(String name)
      Deprecated.
    • AttributeContainerHelper

      public AttributeContainerHelper(String name, List<Attribute> from)
      Deprecated.
  • Method Details

    • filter

      @Deprecated public static AttributeContainer filter(AttributeContainer atts, String... remove)
      Deprecated.
      use AttributeContainer.filter().
      Create a new AttributeContainer, removing any whose name starts with one in the given list.
      Parameters:
      atts - Start with this set of Attributes.
      remove - Remove any whose name starts with one of these.
      Returns:
      new AttributeContainer with attributes removed.
    • show

      @Deprecated public static void show(AttributeContainer atts, Indent indent, Formatter f)
      Deprecated.
    • getName

      public String getName()
      Deprecated.
      Description copied from interface: AttributeContainer
      Get the (optional) name of the AttributeContainer.
      Specified by:
      getName in interface AttributeContainer
    • setImmutable

      @Deprecated public void setImmutable()
      Deprecated.
    • isEmpty

      public boolean isEmpty()
      Deprecated.
      Description copied from interface: AttributeContainer
      True is there are no attributes in the container.
      Specified by:
      isEmpty in interface AttributeContainer
    • getAttributes

      public List<Attribute> getAttributes()
      Deprecated.
      Description copied from interface: AttributeContainer
      Returns immutable list of attributes.
      Specified by:
      getAttributes in interface AttributeContainer
    • addAttribute

      public Attribute addAttribute(Attribute att)
      Deprecated.
      Description copied from interface: AttributeContainer
      Add new or replace old if has same name
      Specified by:
      addAttribute in interface AttributeContainer
      Parameters:
      att - add this Attribute
      Returns:
      the added attribute
    • addAttribute

      public Attribute addAttribute(String name, String value)
      Deprecated.
      Add Attribute; name and value must not be null.
    • addAttribute

      public Attribute addAttribute(String name, Number value)
      Deprecated.
      Add Attribute; name and value must not be null.
    • addAll

      public void addAll(Iterable<Attribute> atts)
      Deprecated.
      Add all; replace old if has same name.
      Specified by:
      addAll in interface AttributeContainer
    • findAttributeString

      public String findAttributeString(String attName, String defaultValue)
      Deprecated.
      Description copied from interface: AttributeContainer
      Find a String Attribute by name (ignore case), return the String value of the Attribute.
      Specified by:
      findAttributeString in interface AttributeContainer
      Returns:
      the attribute value, or defaultValue if not found
    • findAttribute

      public Attribute findAttribute(String name)
      Deprecated.
      Description copied from interface: AttributeContainer
      Find an Attribute by exact match on name.
      Specified by:
      findAttribute in interface AttributeContainer
    • findAttributeIgnoreCase

      public Attribute findAttributeIgnoreCase(String name)
      Deprecated.
      Description copied from interface: AttributeContainer
      Find an Attribute by name, first doing an exact match, then ignoring case.
      Specified by:
      findAttributeIgnoreCase in interface AttributeContainer
    • findAttributeDouble

      public double findAttributeDouble(String attName, double defaultValue)
      Deprecated.
      Description copied from interface: AttributeContainer
      Find a Numeric Attribute by name (ignore case), return the double value of the Attribute.
      Specified by:
      findAttributeDouble in interface AttributeContainer
      Returns:
      the attribute value, or defaultValue if not found
    • findAttributeInteger

      public int findAttributeInteger(String attName, int defaultValue)
      Deprecated.
      Description copied from interface: AttributeContainer
      Find a Numeric Attribute by name (ignore case), return the integer value of the Attribute.
      Specified by:
      findAttributeInteger in interface AttributeContainer
      Returns:
      the attribute value, or defaultValue if not found
    • remove

      public boolean remove(Attribute a)
      Deprecated.
      Remove an Attribute : uses the attribute hashCode to find it.
      Specified by:
      remove in interface AttributeContainer
      Parameters:
      a - remove this attribute
      Returns:
      true if was found and removed
    • replace

      public void replace(Attribute a, String newName)
      Deprecated.
      Replace an Attribute with a different name, same value.
      Parameters:
      a - remove this attribute
    • removeAttribute

      public boolean removeAttribute(String attName)
      Deprecated.
      Remove an Attribute by name.
      Specified by:
      removeAttribute in interface AttributeContainer
      Parameters:
      attName - if exists, remove this attribute
      Returns:
      true if was found and removed
    • removeAttributeIgnoreCase

      public boolean removeAttributeIgnoreCase(String attName)
      Deprecated.
      Remove an Attribute by name, ignoring case
      Specified by:
      removeAttributeIgnoreCase in interface AttributeContainer
      Parameters:
      attName - if exists, remove this attribute
      Returns:
      true if was found and removed
    • toImmutable

      public AttributeContainer toImmutable()
      Deprecated.