Class BioAssayFieldCountValueObject

java.lang.Object
ubic.gemma.model.expression.bioAssay.BioAssayFieldCountValueObject
All Implemented Interfaces:
Serializable

public class BioAssayFieldCountValueObject extends Object implements Serializable
One value a dataset's samples carry for a single BioAssay field, and how many carry it.

The unit is a dataset: a list of these summarises one field across every assay the dataset has, so the counts sum to the dataset's numberOfBioAssays. That is what makes the list readable as a distribution rather than a sample of one — a single-entry list says the field is constant, and a two-entry list says exactly how the dataset splits.

Author:
paul
See Also:
  • Constructor Details

    • BioAssayFieldCountValueObject

      public BioAssayFieldCountValueObject()
    • BioAssayFieldCountValueObject

      public BioAssayFieldCountValueObject(@Nullable String value, int numberOfBioAssays)
      Creates a new BioAssayFieldCountValueObject instance.
      Parameters:
      value - The value itself, spelled exactly as the per-assay field spells it in BioAssayValueObject — so a client can compare the two without a mapping table.

      null is a value here, not an absence: assays that carry nothing for the field are counted under a null-valued entry rather than dropped. Dropping them would make the counts stop summing to the dataset's assay count, and would render a microarray dataset's librarySelection — null on every assay, because the technology has no selection step — as an empty list, which reads as "no assays" instead of "no value".

      numberOfBioAssays - How many of the dataset's assays carry value. Never zero.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getValue

      @Nullable public String getValue()
      The value itself, spelled exactly as the per-assay field spells it in BioAssayValueObject — so a client can compare the two without a mapping table.

      null is a value here, not an absence: assays that carry nothing for the field are counted under a null-valued entry rather than dropped. Dropping them would make the counts stop summing to the dataset's assay count, and would render a microarray dataset's librarySelection — null on every assay, because the technology has no selection step — as an empty list, which reads as "no assays" instead of "no value".

    • getNumberOfBioAssays

      public int getNumberOfBioAssays()
      How many of the dataset's assays carry value. Never zero.
    • setValue

      public void setValue(@Nullable String value)
      The value itself, spelled exactly as the per-assay field spells it in BioAssayValueObject — so a client can compare the two without a mapping table.

      null is a value here, not an absence: assays that carry nothing for the field are counted under a null-valued entry rather than dropped. Dropping them would make the counts stop summing to the dataset's assay count, and would render a microarray dataset's librarySelection — null on every assay, because the technology has no selection step — as an empty list, which reads as "no assays" instead of "no value".

    • setNumberOfBioAssays

      public void setNumberOfBioAssays(int numberOfBioAssays)
      How many of the dataset's assays carry value. Never zero.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object