com.endeca.infront.cartridge.model
Class Attribute<T>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<T>
              extended by com.endeca.infront.cartridge.model.Attribute<T>
Type Parameters:
T - the type of the value(s) in this Attribute
All Implemented Interfaces:
Serializable, Cloneable, Iterable<T>, Collection<T>, List<T>, RandomAccess
Direct Known Subclasses:
JsonAttribute, StringAttribute

public class Attribute<T>
extends ArrayList<T>

An ordered list of values that represents a record attribute that could be single valued or multi-valued. It provides a toString implementation that returns the first value in String form.

Note this class does not have the attribute name

See Also:
Record, Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
Attribute()
           
 
Method Summary
 String toString()
           
 String toString(String delim)
          Uses the argument delimiter to separate multiple values in the list.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

Attribute

public Attribute()
Method Detail

toString

public String toString()
Overrides:
toString in class AbstractCollection<T>
Returns:
The string representation of the first value in this attribute, empty String if the attribute has no values.

toString

public String toString(String delim)
Uses the argument delimiter to separate multiple values in the list. If a value in the attribute list is null, the empty string will be returned.

Returns:
A string containing the property value(s), separated by the passed delimiter if there are multiples. If this Attribute has no values, returns an empty String.


Copyright © 2012, Oracle and/or its affiliates. All rights reserved.