Returns the predecessor of the given element in the list structure
defined by this LinkedListManager.

@param currentElement
@return previous element
13993
@Override
	public  T listGetPrevious(final T currentElement) {

		Relation<T, T, OneStartpoint<T>, OneEndpoint<T>> prevRel = currentElement.getIncomingRelationship(getSiblingLinkType());
		if (prevRel != null) {

			return (T)prevRel.getSourceNode();
		}

		return null;
	}
424925
public static Object getFirstElement(Object maybeIterable) {
    if (!(maybeIterable instanceof Iterable<?>)) return null;
    Iterable<?> iterable = (Iterable<?>) maybeIterable;
    Iterator<?> iterator = iterable.iterator();
    return iterator.hasNext() ? iterator.next() : null;
  }
1233378
public Node lastChild() {

		if (currentNode == null)
			return null;

		Node node = getLastChild(currentNode);

		if (node != null)
			currentNode = node;

		return node;
	}
878886
@SuppressWarnings("unchecked")
  @Override
  public REC previous() {
    checkDirection(false);

    if (currentRecord != null)
      try {
        // RETURN LAST LOADED RECORD
        return (REC) currentRecord;
      } finally {
        currentRecord = null;
      }

    ORecordInternal<?> record = getRecord();

    // MOVE BACKWARD IN THE CURRENT CLUSTER
    while (hasPrevious()) {
      if (currentRecord != null)
        try {
          // RETURN LAST LOADED RECORD
          return (REC) currentRecord;
        } finally {
          currentRecord = null;
        }

      if (record == null)
        record = readCurrentRecord(null, -1);

      if (record != null)
        // FOUND
        if (include(record))
          return (REC) record;
    }

    record = getTransactionEntry();
    if (record != null)
      return (REC) record;

    throw new NoSuchElementException("Direction: backward, last position was: " + current + ", range: " + beginRange + "-"
        + endRange);
  }
687223
function ( selector ) {
            var node = this.element().previousSibling;
            if ( !node ) return;
    
            //comment, text
            if ( node.nodeType == 8 || node.nodeType == 3 && !$B.string.trim(node.data) ) {
                return $B( node ).prev( selector );
            } else {
                if ( typeof selector === 'string' ) node = $B.selector.match( node, selector )? node : undefined;
                return node;
            }
        }
1000655
public static Object previous(Enum self) {
        final Method[] methods = self.getClass().getMethods();
        for (Method method : methods) {
            if (method.getName().equals("previous") && method.getParameterTypes().length == 0) {
                return InvokerHelper.invokeMethod(self, "previous", NO_ARGS);
            }
        }
        Object[] values = (Object[]) InvokerHelper.invokeStaticMethod(self.getClass(), "values", NO_ARGS);
        int index = Arrays.asList(values).indexOf(self);
        return values[index > 0 ? index - 1 : values.length - 1];
    }
865435
@XmlElement(name = "previousPageLink")
    @JsonProperty(value = "previousPageLink")
    @ApiModelProperty(value = "The previous pagination link.", position = 2)
    public PageRequestLinkDto getPreviousPageLink() {
        return previousPageLink;
    }
879435
private Map<Transition<A, S>, N> predecessorsMap(S current){
        //Map<Transition, Node> containing predecessors relations
        Map<Transition<A, S>, N> mapPredecessors = new HashMap<Transition<A, S>, N>();
        //Fill with non-null pairs of <Transition, Node>
        for (Transition<A, S> predecessor : predecessorFunction.transitionsFrom(current)) {
            N predecessorNode = visited.get(predecessor.getState());
            if (predecessorNode != null) {
                mapPredecessors.put(predecessor, predecessorNode);
            }
        }
        return mapPredecessors;
    }
673802
function lastChildElement (parent, callback) {
  for (let child = parent.lastElementChild; child; child = child.previousElementSibling) {
    if (callback(child)) {
      return child
    }
  }
  return null
}
374385
@Override
    public IChemObject previous() {
        try {
            return readRecord(currentRecord - 1);
        } catch (Exception x) {
            logger.error(x);
            return null;
        }
    }
472690
def previousSibling(self) -> Optional[AbstractNode]:
        
        parent = self.parentNode
        if parent is None:
            return None
        return parent.childNodes.item(parent.childNodes.index(self) - 1)
710979
public Entry getPrevious()
  {
    checkEntryParent();

    Entry entry = null;

    if(!isFirst())
    {
      entry = previous;
    }

    return entry;
  }
585485
function getFirstChildElement(parent) {
  var cursor = parent.firstChild;

  while (cursor && cursor.nodeType !== 1) {
    cursor = cursor.nextSibling;
  }
  return cursor;
}
1142211
public function previousSibling()
    {
        $node = $this->node->previousSibling;

        if ($node === null) {
            return null;
        }

        return new Element($node);
    }
1074790
public Node<T> getPrevious(Node<T> node) {
    	if (node.left != null) {
    		node = node.left;
    		while (node.right != null) node = node.right;
    		return node;
    	}
    	// nothing at left, it may be the parent node if the node is at the right
    	if (node == first) return null;
    	return getPrevious(root, node.value);
    }
784123
@Override
	public void listInsertBefore(final T currentElement, final T newElement) throws FrameworkException {

		if (currentElement.getUuid().equals(newElement.getUuid())) {
			throw new IllegalStateException("Cannot link a node to itself!");
		}

		final T previousElement = listGetPrevious(currentElement);
		if (previousElement == null) {

			linkNodes(getSiblingLinkType(), newElement, currentElement);

		} else {
			// delete old relationship
			unlinkNodes(getSiblingLinkType(), previousElement, currentElement);

			// dont create self link
			if (!previousElement.getUuid().equals(newElement.getUuid())) {
				linkNodes(getSiblingLinkType(), previousElement, newElement);
			}

			// dont create self link
			if (!newElement.getUuid().equals(currentElement.getUuid())) {
				linkNodes(getSiblingLinkType(), newElement, currentElement);
			}
		}
	}
604915
function previously(currentValue, partial) {
    var previous = {};
    Object.keys(partial).forEach(function(key) {
        if (isObject(currentValue[key] && partial[key])) {
            previous[key] = previously(currentValue[key], partial[key]);
        } else {
            previous[key] = currentValue[key];
        }
    });
    return previous;
}