Ejemplo n.º 1
0
  /**
   * If there is a SubEdition at a key in an edition, and if a spec is supplied, that it can be
   * certified as the given type
   */
  public static boolean checkSubEdition(
      FeEdition parent, Position key, FeWrapperSpec spec, boolean required) {
    FeRangeElement value;
    value = parent.fetch(key);
    if (value == null) {
      return !required;
    }
    return (value instanceof FeEdition) && (spec == null || (spec.certify(((FeEdition) value))));
    /*
    udanax-top.st:23624:FeWrapper class methodsFor: 'protected: checking'!
    {BooleanVar} checkSubEdition: parent {FeEdition}
    	with: key {Position}
    	with: spec {FeWrapperSpec | NULL}
    	with: required {BooleanVar}
    	"If there is a SubEdition at a key in an edition, and if a spec is supplied, that it can be certified as the given type"

    	| value {FeRangeElement} |
    	value := parent fetch: key.
    	value == NULL ifTrue: [^required not].
    	^(value isKindOf: FeEdition)
    		and: [spec == NULL
    			or: [spec certify: (value cast: FeEdition)]]!
    */
  }