private NSArray<IndexAttribute> attributes() { return _attributes.allValues(); }
public NSArray criteriaList() { //OWDebug.println(1, "_recordGroupDict.allKeys(): "+_recordGroupDict.allKeys()); //return _recordGroupDict.allKeys(); return _masterCriteria.criteriaLookupDict().allValues(); }
/** * Takes the result of a tagCount call and an array of categories and * distributes the entries in the tagCount hash evenly across the * categories based on the count value for each tag. * * Typically, this is used to display a 'tag cloud' in your UI. * * @param tagHash the tag dictionary returned from a tagCount call * @param categoryList An array containing the categories to split the tags * @return a dictionary mapping each tag name to its corresponding category */ public <U> NSDictionary<String, U> cloud(NSDictionary<String, Integer> tagHash, NSArray<U> categoryList) { int min = 0; int max = 0; for (Integer count : tagHash.allValues()) { if (count.intValue() > max) { max = count.intValue(); } if (count.intValue() < min) { min = count.intValue(); } } NSMutableDictionary<String, U> cloud = new NSMutableDictionary<>(); int divisor = ((max - min) / categoryList.count()) + 1; for (Map.Entry<String, Integer> entry : tagHash.entrySet()) { U obj = categoryList.objectAtIndex((entry.getValue().intValue() - min) / divisor); cloud.setObjectForKey(obj, entry.getKey()); } return cloud; }
public NSMutableDictionary childrenFromGroupCriteriaList() { DRCriteria crit; NSArray crits = _masterCriteria.criteriaLookupDict().allValues(); Enumeration anEnum = crits.objectEnumerator(); NSMutableDictionary recGrpDict = new NSMutableDictionary(); while (anEnum.hasMoreElements()) { crit = (DRCriteria)anEnum.nextElement(); DRRecordGroup recGrp = DRRecordGroup.withCriteriaGroupParent(crit, this, null); recGrpDict.setObjectForKey(recGrp, crit.keyDesc()); } return recGrpDict; }
/** * Checks whether the current property is declared dependent via the * propertyDependencies key. * * @return true if the current property is dependent */ public Object isDependent(D2WContext context) { boolean isDependent = false; NSDictionary<String, NSArray<String>> propertyDependencies = ERMDAjaxNotificationCenter.PROPERTY_DEPENDENCIES .valueInObject(context); if (propertyDependencies != null) { if (ERXArrayUtilities.flatten(propertyDependencies.allValues()).contains( context.propertyKey())) { isDependent = true; } } return isDependent; }
NSDictionary<String, Object> row; while ((row = channel.fetchRow()) != null) { Enumeration pksEnum = row.allValues().objectEnumerator(); while (pksEnum.hasMoreElements()) { Number pkObj = (Number) pksEnum.nextElement();
public NSArray currentEventDescriptions() { NSMutableArray<String> descs; NSDictionary<String,String> map; map = EOEvent.eventTypeDescriptions(currentClass); descs = new NSMutableArray<>(); descs.setArray(map.allValues()); descs.removeObject(map.objectForKey(EOEvent.EventGroupName)); try { descs.sortUsingComparator(NSComparator.AscendingStringComparator); } catch (NSComparator.ComparisonException e) { throw NSForwardException._runtimeExceptionForThrowable(e); } descs.insertObjectAtIndex(map.objectForKey(EOEvent.EventGroupName), 0); return descs; }