Yarn: LoopingStream -> MultiUseStream

Created on 2 Jun 2019  路  1Comment  路  Source: FabricMC/yarn

The name came from https://github.com/FabricMC/yarn/pull/338#discussion_r242899941

The comment is correctly describing the functionality, the class allows using a stream multiple times. But in my opinion the current name "LoopingStream" suggests that the stream continues at the beginning once it reached the end.

A name like "MultiUseStream" might fit better. Similarly the method getStream should be named newStream to indicate that a new stream and not an existing one is returned.

The fields could use the following names:

Obfuscated | Deobfuscated
--- | ---
a | collectedElements
b | delegate / source

And if it is possible to name the field of the anonymous class, then it could be named index / currentIndex.

Most helpful comment

I would suggest ReusableStream.

>All comments

I would suggest ReusableStream.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

haykam821 picture haykam821  路  4Comments

altrisi picture altrisi  路  4Comments

enbrain picture enbrain  路  4Comments

Bixilon picture Bixilon  路  5Comments

ChloeDawn picture ChloeDawn  路  6Comments