Returns true if there is at least one embedded item with link-relation type {@code rel}, and if the item will
be rendered as an array of embedded items instead of a single object.

@param rel the link-relation type
@return boolean

@since 2.0.0
340053
public boolean isArray(final String rel) {
        final String resolvedRel = curies.resolve(rel);
        return hasItem(rel) && (items.get(resolvedRel) instanceof List);
    }
1367157
public boolean hasCollectionFetch()
	{
		if (fetches != null)
			for (String fetch : fetches)
			{
				QEntity parent = entity;

				final String[] parts = StringUtils.split(fetch, '.');

				for (int i = 0; i < parts.length; i++)
				{
					// If this is a fully supported relation then continue checking
					if (parent.hasRelation(parts[i]))
					{
						final QRelation relation = parent.getRelation(parts[i]);

						parent = relation.getEntity();

						if (relation.isCollection())
						{
							if (log.isTraceEnabled())
								log.trace("Encountered fetch " +
								          fetch +
								          ". This resolves to " +
								          relation +
								          " which is a collection");

							return true;
						}
					}
					// This covers partially-supported things like Map and other basic collections that don't have a QRelation description
					else if (parent.hasNonEntityRelation(parts[i]))
					{
						if (parent.isNonEntityRelationCollection(parts[i]))
							return true;
					}
					else
					{
						log.warn("Encountered relation " +
						         parts[i] +
						         " on " +
						         parent.getName() +
						         " as part of path " +
						         fetch +
						         ". Assuming QEntity simply does not know this relation. Assuming worst case scenario (collection join is involved)");
						return true;
					}
				}
			}

		return false;
	}
580285
private boolean existsStrongerInColumn(INode source, INode target) {
        boolean result = false;

        char current = defautlMappings.getRelation(source, target);

        //compare with the other relations in the column
        for (INode i : defautlMappings.getSourceContext().getNodesList()) {
            if (i != source && defautlMappings.getRelation(i, target) != IMappingElement.IDK
                    && isPrecedent(defautlMappings.getRelation(i, target), current)) {
                result = true;
                break;
            }
        }

        return result;
    }
808989
private function isRelation($type)
    {
        return in_array(
            $type,
            [
                ClassMetadataInfo::REFERENCE_ONE,
                ClassMetadataInfo::REFERENCE_MANY,
                ClassMetadataInfo::EMBED_ONE,
                ClassMetadataInfo::EMBED_MANY,
            ],
            true
        );
    }
630209
private boolean checkRingLink(IRingSet ringSet, IAtomContainer ac, IAtom atom) {
        List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
        if (ringSet.contains(atom)) {
            return true;
        }
        for (IAtom neighbour : neighbours) {
            if (ringSet.contains(neighbour)) {
                return true;
            }
        }
        return false;
    }
412530
private boolean isRelational(EntityMetadata m)
    {
        // if related via join table OR contains relations.
        return m.isRelationViaJoinTable() || (m.getRelationNames() != null && (!m.getRelationNames().isEmpty()));
    }
473665
private boolean isRelated(Task task, List<Relation> list)
   {
      boolean result = false;
      for (Relation relation : list)
      {
         if (relation.getTargetTask().getUniqueID().intValue() == task.getUniqueID().intValue())
         {
            result = true;
            break;
         }
      }
      return result;
   }
236937
@Override
	public Links findLinksWithRel(LinkRelation relation, String representation) {

		Assert.notNull(relation, "LinkRelation must not be null!");
		Assert.notNull(representation, "Representation must not be null!");

		return relation.isSameAs(IanaLinkRelations.SELF) //
				? addSelfLink(super.findLinksWithRel(relation, representation), representation) //
				: super.findLinksWithRel(relation, representation);
	}
215538
private boolean itemInItemStateList(List<ItemState> list, String itemId, int state)
   {
      boolean retval = false;
      for (ItemState itemState : list)
      {
         if (itemState.getState() == state && itemState.getData().getIdentifier().equals(itemId))
         {
            retval = true;
            break;
         }
      }

      return retval;
   }
285587
public List<HalResource> getResourcesByRel(final String rel)
    {
        final List<? extends ReadableRepresentation> resources = representation.getResourcesByRel(rel);

        return resources.stream()
                .map(representation -> new HalResource(objectMapper, representation))
                .collect(Collectors.toList());
    }
1314223
public boolean hasDecoration(byte decorationType) {
		if (hasDecorations()) {
            for (Decoration m_decoration : m_decorations) {
                if (m_decoration.isType(decorationType))
                    return true;
            }
		}
		return false;
	}
805968
private boolean containsElements(final Collection<?> coll) {
        if (coll == null || coll.isEmpty()) {
            return false;
        }
        for (final Object name : coll) {
            if (name != null) {
                return true;
            }
        }
        return false;
    }
10849
public final boolean isParentItem(int adapterPosition) {
        int itemCount = 0;

        int parentCount = parentItemCount();
        for (int i = 0; i < parentCount; i++) {
            if (itemCount == adapterPosition) {
                return true;
            }

            itemCount += 1;

            if (isExpanded(i)) {
                itemCount += childItemCount(i);
            } else {
                // itemCount += 1;
            }
        }

        return false;
    }
1177941
@Override
	public boolean belongsToBundle(String itemPath) {

		boolean belongsToBundle = false;

		for (BundlePath path : bundlePathMapping.getItemPathList()) {
			if (path.getPath().equals(itemPath)) {
				belongsToBundle = true;
				break;
			}
		}
		if (!belongsToBundle) {
			for (BundlePath path : bundlePathMapping.getItemDebugPathList()) {
				if (path.getPath().equals(itemPath)) {
					belongsToBundle = true;
					break;
				}
			}
		}

		return belongsToBundle;
	}
1123862
public boolean isList() {
    Object ptr = cdr;
    while (ptr instanceof ConsValue) {
      ptr = ((ConsValue) ptr).cdr;
    }
    return ptr == ConstantValue.NIL;
  }
1341967
def relate_to(self, target, reltype, is_external=False):
        
        if is_external:
            return self.rels.get_or_add_ext_rel(reltype, target)
        else:
            rel = self.rels.get_or_add(reltype, target)
            return rel.rId
1010699
@SuppressWarnings("unchecked")
	@Nullable
	public EmbeddedWrapper wrap(@Nullable Object source, LinkRelation rel) {

		if (source == null) {
			return null;
		}

		if (source instanceof EmbeddedWrapper) {
			return (EmbeddedWrapper) source;
		}

		if (source instanceof Collection) {
			return new EmbeddedCollection((Collection<Object>) source, rel);
		}

		if (preferCollections) {
			return new EmbeddedCollection(Collections.singleton(source), rel);
		}

		return new EmbeddedElement(source, rel);
	}