/** * Test if this compound variable has a given index. * * @param tails The set of tail expressions. * @param argCount The argument count * * @return True if the fully resolved tail exists in the stem, false * otherwise. */ RexxObject *StemClass::hasIndex(RexxObject **tailElements, size_t argCount) { if (argCount == 0) { return TheTrueObject; // we always have something here } // compose the tail element CompoundVariableTail resolved_tail((RexxInternalObject **)tailElements, argCount); // see if we have a compound CompoundTableElement *compound = findCompoundVariable(resolved_tail); // if there's a variable there, and it has a real value, then // this is true. return booleanObject(compound != OREF_NULL && compound->getVariableValue() != OREF_NULL); }
/** * Indicate if this method was defined as a constant method * (using ::constant) * * @return .true if the method is defined as an attribute. * .false otherwise. */ RexxObject *MethodClass::isConstantRexx( ) { return booleanObject(isConstant()); }
/** * Indicate if this method was defined as an attribute method * (using ::attribute or ::method attribute) * * @return .true if the method is defined as an attribute. * .false otherwise. */ RexxObject *MethodClass::isAttributeRexx( ) { return booleanObject(isAttribute()); }
/** * Indicate if this is an abstract method * * @return .true if the method is abstract. .false otherwise. */ RexxObject *MethodClass::isAbstractRexx( ) { return booleanObject(isAbstract()); }
/** * Return the Protected setting for a method object. * * @return .true if the method is protected. .false otherwise. */ RexxObject *MethodClass::isProtectedRexx( ) { return booleanObject(isProtected()); }
/** * Return the Package setting for a method object. * * @return .true if the method is package scope. .false * otherwise. */ RexxObject *MethodClass::isPackageRexx( ) { return booleanObject(isPackageScope()); }
/** * Return the Private setting for a method object. * * @return .true if the method is private. .false otherwise. */ RexxObject *MethodClass::isPrivateRexx( ) { return booleanObject(isPrivate()); }
/** * Return the Guarded setting for a method object. * * @return .true if the method is guarded. .false otherwise. */ RexxObject *MethodClass::isGuardedRexx( ) { return booleanObject(isGuarded()); }
/** * Test if the supplier has a next item available. * * @return True if there are still objects to supply, false otherwise. */ RexxObject *SupplierClass::available() { // test if we have an available next item return booleanObject(isAvailable()); }
/** * Search for any index that matches the target object. * * @param target The object of interest. * * @return .true if the object is in the collection, .false otherwise. */ RexxObject *StemClass::hasItem(RexxInternalObject *target) { CompoundTableElement *variable = findByValue(target); return booleanObject(variable != OREF_NULL); }
/** * Test if the stem is empty. * * @return True if the stem is empty, false otherwise. */ RexxObject *StemClass::isEmptyRexx() { return booleanObject(isEmpty()); }