Class CompositeValue
java.lang.Object
com.northconcepts.datapipeline.core.CompositeValue
A fixed-size list of values used as a composite key (for example in lookups, grouping and duplicate removal);
a single-value instance hashes like, and equals, that value itself.
-
Constructor Summary
ConstructorsConstructorDescriptionCompositeValue(int valueCount) Creates an instance withvalueCountnull values to fill in withset(int, Object).CompositeValue(Object... values) Creates an instance backed by the given array, which is not copied.CompositeValue(List<?> values) Creates an instance holding a copy of the list's values. -
Method Summary
Modifier and TypeMethodDescriptionbooleanget(int index) Object[]getAll()Returns the backing array of values, not a copy; change values withset(int, Object)so the cached hash code is reset.Returns the values as a bracketed, comma-separated list, such as[a, 1, null].inthashCode()booleanisNull()Returns true if every value is null, including when there are no values.intsize()toString()
-
Constructor Details
-
CompositeValue
public CompositeValue(int valueCount) Creates an instance withvalueCountnull values to fill in withset(int, Object). -
CompositeValue
Creates an instance holding a copy of the list's values. -
CompositeValue
Creates an instance backed by the given array, which is not copied.
-
-
Method Details
-
set
-
get
-
getAll
Returns the backing array of values, not a copy; change values withset(int, Object)so the cached hash code is reset. -
isNull
public boolean isNull()Returns true if every value is null, including when there are no values. -
size
public int size() -
hashCode
public int hashCode() -
equals
-
getValuesAsString
Returns the values as a bracketed, comma-separated list, such as[a, 1, null]. -
toString
-