Deserialize a base-58-encoded HD Key.
@param parent The parent node in the given key's deterministic hierarchy.
@throws IllegalArgumentException if the base58 encoded key could not be parsed.
329108
public static DeterministicKey deserializeB58(@Nullable DeterministicKey parent, String base58, NetworkParameters params) {
        return deserialize(params, Base58.decodeChecked(base58), parent);
    }
449894
def serialize_on_parent(
            self,
            parent,  # type: ET.Element
            value,  # type: Any
            state  # type: _ProcessorState
    ):
        # type: (...) -> None
        """"""
        dict_value = self._converter.to_dict(value)
        self._dictionary.serialize_on_parent(parent, dict_value, state)
111618
synchronized void setDefaultParent(final Actor defaultParent) {
    if (defaultParent != null && this.defaultParent != null) {
      throw new IllegalStateException("Default parent already exists.");
    }

    this.defaultParent = defaultParent;
  }
1124386
public int setParent(Node parent)
    {
        if (parent != null)
        {
            depth = parent.getDepth() + 1;
        }
        this.parent = parent;
        return depth;
    }
1201258
private void parse(String text, int start, int end)
   {
      int closing = getClosingParenthesisPosition(text, start);
      if (closing == -1 || closing > end)
      {
         throw new IllegalStateException("Error in parenthesis hierarchy");
      }
      if (!text.startsWith("(0||"))
      {
         throw new IllegalStateException("Not a valid record");
      }

      int valueStart = getNextOpeningParenthesisPosition(text, start);
      int valueStop = getClosingParenthesisPosition(text, valueStart);
      int dictStart = getNextOpeningParenthesisPosition(text, valueStop);
      int dictStop = getClosingParenthesisPosition(text, dictStart);
      parse(text, start + 4, valueStart, valueStop, dictStart, dictStop);
   }
1227976
protected boolean doesParentMatch(final CSNodeWrapper parent, final CSNodeWrapper entityParent) {
        if (parent != null && entityParent != null) {
            if (parent.getId() != null && parent.getId().equals(entityParent.getId())) {
                return true;
            } else if (parent.getId() == null && entityParent.getId() == null && parent == entityParent) {
                return true;
            } else {
                return false;
            }
        } else if (parent == null && entityParent == null) {
            return true;
        } else {
            return false;
        }
    }
836823
def parent_key
      groups = self.c000.split('-').reverse!
      changed = false
      groups.map! do |group|
        if changed || group == "00000"
          group
        else
          changed = true
          "00000"
        end
      end
      c000 = groups.reverse!.join('-')
    end
123278
function(parent, key) {
        this.parent = this.parent || parent;
        this.key = this.key || key;
        if (this.parent !== parent) {
          throw new Error(
            'Internal Error. Relation retrieved from two different Objects.'
          );
        }
        if (this.key !== key) {
          throw new Error(
            'Internal Error. Relation retrieved from two different keys.'
          );
        }
      }
884173
public final void ruleParenthesizedAssignableElement() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXtext.g:958:2: ( ( ( rule__ParenthesizedAssignableElement__Group__0 ) ) )
            // InternalXtext.g:959:2: ( ( rule__ParenthesizedAssignableElement__Group__0 ) )
            {
            // InternalXtext.g:959:2: ( ( rule__ParenthesizedAssignableElement__Group__0 ) )
            // InternalXtext.g:960:3: ( rule__ParenthesizedAssignableElement__Group__0 )
            {
             before(grammarAccess.getParenthesizedAssignableElementAccess().getGroup()); 
            // InternalXtext.g:961:3: ( rule__ParenthesizedAssignableElement__Group__0 )
            // InternalXtext.g:961:4: rule__ParenthesizedAssignableElement__Group__0
            {
            pushFollow(FollowSets000.FOLLOW_2);
            rule__ParenthesizedAssignableElement__Group__0();

            state._fsp--;


            }

             after(grammarAccess.getParenthesizedAssignableElementAccess().getGroup()); 

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
1303918
public static Long decodeLongObjDesc(byte[] src, int srcOffset)
        throws CorruptEncodingException
    {
        try {
            int b = src[srcOffset];
            if (b == NULL_BYTE_HIGH || b == NULL_BYTE_LOW) {
                return null;
            }
            return decodeLongDesc(src, srcOffset + 1);
        } catch (IndexOutOfBoundsException e) {
            throw new CorruptEncodingException(null, e);
        }
    }
184287
protected void ensureParentage(AbstractNode child) throws IllegalStateException {
		if (child.parent == this) return;
		
		throw new IllegalStateException(String.format(
				"Can't disown child of type %s - it isn't my child (I'm a %s)",
				child.getClass().getName(), this.getClass().getName()));
	}
591708
@Override
  public ParseResult parse(Reader reader, AttributeSource parent)
      throws IOException {
    ParseResult res = new ParseResult();

    // get MtasUpdateRequestProcessorResult
    StringBuilder sb = new StringBuilder();
    char[] buf = new char[128];
    int cnt;
    while ((cnt = reader.read(buf)) > 0) {
      sb.append(buf, 0, cnt);
    }
    Iterator<MtasUpdateRequestProcessorResultItem> iterator;

    try (
        MtasUpdateRequestProcessorResultReader result = new MtasUpdateRequestProcessorResultReader(
            sb.toString());) {
      iterator = result.getIterator();
      if (iterator != null && iterator.hasNext()) {
        res.str = result.getStoredStringValue();
        res.bin = result.getStoredBinValue();
      } else {
        res.str = null;
        res.bin = null;
        result.close();
        return res;
      }
      parent.clearAttributes();
      while (iterator.hasNext()) {
        MtasUpdateRequestProcessorResultItem item = iterator.next();
        if (item.tokenTerm != null) {
          CharTermAttribute catt = parent.addAttribute(CharTermAttribute.class);
          catt.append(item.tokenTerm);
        }
        if (item.tokenFlags != null) {
          FlagsAttribute flags = parent.addAttribute(FlagsAttribute.class);
          flags.setFlags(item.tokenFlags);
        }
        if (item.tokenPosIncr != null) {
          PositionIncrementAttribute patt = parent
              .addAttribute(PositionIncrementAttribute.class);
          patt.setPositionIncrement(item.tokenPosIncr);
        }
        if (item.tokenPayload != null) {
          PayloadAttribute p = parent.addAttribute(PayloadAttribute.class);
          p.setPayload(new BytesRef(item.tokenPayload));
        }
        if (item.tokenOffsetStart != null && item.tokenOffsetEnd != null) {
          OffsetAttribute offset = parent.addAttribute(OffsetAttribute.class);
          offset.setOffset(item.tokenOffsetStart, item.tokenOffsetEnd);
        }
        // capture state and add to result
        State state = parent.captureState();
        res.states.add(state.clone());
        // reset for reuse
        parent.clearAttributes();
      }
    } catch (IOException e) {
      // ignore
      log.debug(e);
    }
    return res;
  }
796061
def set_parent(self, key_name, new_parent):
        """"""
        self.unbake()
        kf = self.dct[key_name]
        kf['parent'] = new_parent
        self.bake()
384690
private void deserializePrimary(byte[] descriptor) throws IOException {
        // according to the spec, some ISO 9660 file systems can contain multiple identical primary
        // volume descriptors
        if (this.hasPrimary) {
            return;
        }

        validateBlockSize(descriptor);

        if (!this.hasSupplementary) {
            deserializeCommon(descriptor);
        }

        this.standardIdentifier = Util.getDChars(descriptor, 2, 5);
        this.volumeSetSize = Util.getUInt16Both(descriptor, 121);
        this.volumeSequenceNumber = Util.getUInt16Both(descriptor, 125);
        this.totalBlocks = Util.getUInt32Both(descriptor, 81);
        this.publisher = Util.getDChars(descriptor, 319, 128);
        this.preparer = Util.getDChars(descriptor, 447, 128);
        this.application = Util.getDChars(descriptor, 575, 128);
        //this.copyrightFile = Descriptor.get(buffer, 703, 37)
        //this.abstractFile = Descriptor.get(buffer, 740, 37)
        //this.bibliographicalFile = Descriptor.get(buffer, 777, 37)
        this.creationTime = Util.getStringDate(descriptor, 814);
        this.mostRecentModificationTime = Util.getStringDate(descriptor, 831);
        this.expirationTime = Util.getStringDate(descriptor, 848);
        this.effectiveTime = Util.getStringDate(descriptor, 865);
        this.pathTableSize = Util.getUInt32Both(descriptor, 133);
        this.locationOfLittleEndianPathTable = Util.getUInt32LE(descriptor, 141);
        this.locationOfOptionalLittleEndianPathTable = Util.getUInt32LE(descriptor, 145);
        this.locationOfBigEndianPathTable = Util.getUInt32BE(descriptor, 149);
        this.locationOfOptionalBigEndianPathTable = Util.getUInt32BE(descriptor, 153);

        this.hasPrimary = true;
    }
517090
private void createCompleteKey(Key parent, long id) {
    String kind = entityMetadata.getKind();
    if (parent == null) {
      key = entityManager.newNativeKeyFactory().setKind(kind).newKey(id);
    } else {
      key = Key.newBuilder(parent, kind, id).build();
    }
  }
996645
@Override
  public Key getParent() {
    List<PathElement> ancestors = getAncestors();
    if (ancestors.isEmpty()) {
      return null;
    }
    PathElement parent = ancestors.get(ancestors.size() - 1);
    Key.Builder keyBuilder;
    if (parent.hasName()) {
      keyBuilder = Key.newBuilder(getProjectId(), parent.getKind(), parent.getName());
    } else {
      keyBuilder = Key.newBuilder(getProjectId(), parent.getKind(), parent.getId());
    }
    String namespace = getNamespace();
    if (namespace != null) {
      keyBuilder.setNamespace(namespace);
    }
    return keyBuilder.addAncestors(ancestors.subList(0, ancestors.size() - 1)).build();
  }
224675
@Deprecated
    public void initNesting() {
        boolean nested = setupManyNesting();
        if (!nested && shouldBeNested()) {
            setupOneNesting();
        }
        if (isNested()) {
            PreconditionUtil.verify(parentField.getOppositeName() != null,
                    "relationship between parent pointing to a nested resource must specify @JsonApiRelation.mappedBy or @JsonApiRelation.opposite, not "
                            + "found for '%s' of %s",
                    parentField.getUnderlyingName(), implementationClass);
        }
    }