Class Composite

  • All Implemented Interfaces:
    Serializable, Cloneable, Map<String,​String>

    public class Composite
    extends ImageObject
    The description of a single composite ImageObject, or a family of such objects, obtained by parsing its name (which may contain wildcards). Unlike other ImageObject, Composite ones are dynamically generated, because they are drawn from a large space.

    A Composite object may be a "concrete" one (has no wildcards, and describes exactly one ImageObject), or a "family" one (has wildcards that match a group of objects). The sample() method can be used to randomly draw a concrete object from a family.

    See Also:
    Serialized Form
    • Constructor Detail

      • Composite

        public Composite​(String name)
        Constructs a concrete or "family" Composite object based on a name string.
        Parameters:
        name - E.g. "/composite/h/d=???/b=123/gq/gq/gq"
    • Method Detail

      • isWild

        public boolean isWild()
        Does the name contain wildcards, thus describing a family of Composite images, rather than a single "concrete" image?
      • getSvg

        public String getSvg()
        Description copied from class: ImageObject
        The SVG code for the image, if available. It is mandatory for dynamically generated ImageObjects (/composite). For static ones, it may or may not be null.
        Overrides:
        getSvg in class ImageObject
      • familySize

        public BigInteger familySize()
        How many distinct concrete Composite ImageObjects does this Composite object describe? The result is based on the number of wildcards in this object. BigInteger is used because the number can be combinatorially large.
      • sample

        public Composite sample​(Random random)
        If this is a wildcard description, generates a "concrete" (non-wildcard) desription of a matching composite object
      • isCompositeName

        public static boolean isCompositeName​(String name)
      • setNeedFeatures

        public static void setNeedFeatures​(boolean x)
      • getAllFeatures

        public Map<String,​Set<Object>> getAllFeatures()
        For the CGS' FEATURE command