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 Summary
Constructors Constructor Description AttributeContainerHelper(String name)Deprecated.AttributeContainerHelper(String name, List<Attribute> from)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddAll(Iterable<Attribute> atts)Deprecated.Add all; replace old if has same name.AttributeaddAttribute(String name, Number value)Deprecated.Add Attribute; name and value must not be null.AttributeaddAttribute(String name, String value)Deprecated.Add Attribute; name and value must not be null.AttributeaddAttribute(Attribute att)Deprecated.Add new or replace old if has same namestatic AttributeContainerfilter(AttributeContainer atts, String... remove)Deprecated.use AttributeContainer.filter().AttributefindAttribute(String name)Deprecated.Find an Attribute by exact match on name.doublefindAttributeDouble(String attName, double defaultValue)Deprecated.Find a Numeric Attribute by name (ignore case), return the double value of the Attribute.AttributefindAttributeIgnoreCase(String name)Deprecated.Find an Attribute by name, first doing an exact match, then ignoring case.intfindAttributeInteger(String attName, int defaultValue)Deprecated.Find a Numeric Attribute by name (ignore case), return the integer value of the Attribute.StringfindAttributeString(String attName, String defaultValue)Deprecated.Find a String Attribute by name (ignore case), return the String value of the Attribute.List<Attribute>getAttributes()Deprecated.Returns immutable list of attributes.StringgetName()Deprecated.Get the (optional) name of the AttributeContainer.booleanisEmpty()Deprecated.True is there are no attributes in the container.booleanremove(Attribute a)Deprecated.Remove an Attribute : uses the attribute hashCode to find it.booleanremoveAttribute(String attName)Deprecated.Remove an Attribute by name.booleanremoveAttributeIgnoreCase(String attName)Deprecated.Remove an Attribute by name, ignoring casevoidreplace(Attribute a, String newName)Deprecated.Replace an Attribute with a different name, same value.voidsetImmutable()Deprecated.static voidshow(AttributeContainer atts, Indent indent, Formatter f)Deprecated.AttributeContainertoImmutable()Deprecated.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ucar.nc2.AttributeContainer
findAttValueIgnoreCase, hasAttribute, hasAttributeIgnoreCase, iterator
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
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:AttributeContainerGet the (optional) name of the AttributeContainer.- Specified by:
getNamein interfaceAttributeContainer
-
setImmutable
@Deprecated public void setImmutable()
Deprecated.
-
isEmpty
public boolean isEmpty()
Deprecated.Description copied from interface:AttributeContainerTrue is there are no attributes in the container.- Specified by:
isEmptyin interfaceAttributeContainer
-
getAttributes
public List<Attribute> getAttributes()
Deprecated.Description copied from interface:AttributeContainerReturns immutable list of attributes.- Specified by:
getAttributesin interfaceAttributeContainer
-
addAttribute
public Attribute addAttribute(Attribute att)
Deprecated.Description copied from interface:AttributeContainerAdd new or replace old if has same name- Specified by:
addAttributein interfaceAttributeContainer- 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:
addAllin interfaceAttributeContainer
-
findAttributeString
public String findAttributeString(String attName, String defaultValue)
Deprecated.Description copied from interface:AttributeContainerFind a String Attribute by name (ignore case), return the String value of the Attribute.- Specified by:
findAttributeStringin interfaceAttributeContainer- Returns:
- the attribute value, or defaultValue if not found
-
findAttribute
public Attribute findAttribute(String name)
Deprecated.Description copied from interface:AttributeContainerFind an Attribute by exact match on name.- Specified by:
findAttributein interfaceAttributeContainer
-
findAttributeIgnoreCase
public Attribute findAttributeIgnoreCase(String name)
Deprecated.Description copied from interface:AttributeContainerFind an Attribute by name, first doing an exact match, then ignoring case.- Specified by:
findAttributeIgnoreCasein interfaceAttributeContainer
-
findAttributeDouble
public double findAttributeDouble(String attName, double defaultValue)
Deprecated.Description copied from interface:AttributeContainerFind a Numeric Attribute by name (ignore case), return the double value of the Attribute.- Specified by:
findAttributeDoublein interfaceAttributeContainer- Returns:
- the attribute value, or defaultValue if not found
-
findAttributeInteger
public int findAttributeInteger(String attName, int defaultValue)
Deprecated.Description copied from interface:AttributeContainerFind a Numeric Attribute by name (ignore case), return the integer value of the Attribute.- Specified by:
findAttributeIntegerin interfaceAttributeContainer- 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:
removein interfaceAttributeContainer- 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:
removeAttributein interfaceAttributeContainer- 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:
removeAttributeIgnoreCasein interfaceAttributeContainer- Parameters:
attName- if exists, remove this attribute- Returns:
- true if was found and removed
-
toImmutable
public AttributeContainer toImmutable()
Deprecated.
-
-