Class HashOps
java.lang.Object
net.minecraft.util.HashOps
- All Implemented Interfaces:
DynamicOps<com.google.common.hash.HashCode>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classprivate final class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HashOpsprivate final com.google.common.hash.HashCodestatic final byte[]static final byte[]private static final byte[]private final com.google.common.hash.HashCodeprivate final com.google.common.hash.HashCodeprivate static final byte[]private final com.google.common.hash.HashCodeprivate static final Comparator<com.google.common.hash.HashCode> private final com.google.common.hash.HashFunctionprivate static final Comparator<Map.Entry<com.google.common.hash.HashCode, com.google.common.hash.HashCode>> private static final Comparator<Pair<com.google.common.hash.HashCode, com.google.common.hash.HashCode>> private static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byteprivate static final byte[]private final com.google.common.hash.HashCodeprivate static final DataResult<Object> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<U> UconvertTo(DynamicOps<U> outOps, com.google.common.hash.HashCode input) com.google.common.hash.HashCodecreateBoolean(boolean value) com.google.common.hash.HashCodecreateByte(byte value) com.google.common.hash.HashCodecreateByteList(ByteBuffer input) com.google.common.hash.HashCodecreateDouble(double value) com.google.common.hash.HashCodecreateFloat(float value) com.google.common.hash.HashCodecreateInt(int value) com.google.common.hash.HashCodecreateIntList(IntStream input) com.google.common.hash.HashCodecreateList(Stream<com.google.common.hash.HashCode> input) com.google.common.hash.HashCodecreateLong(long value) com.google.common.hash.HashCodecreateLongList(LongStream input) com.google.common.hash.HashCodecom.google.common.hash.HashCodecom.google.common.hash.HashCodecreateNumeric(Number value) com.google.common.hash.HashCodecreateShort(short value) com.google.common.hash.HashCodecreateString(String value) com.google.common.hash.HashCodeempty()com.google.common.hash.HashCodecom.google.common.hash.HashCodeemptyMap()DataResult<com.google.common.hash.HashCode> getBooleanValue(com.google.common.hash.HashCode input) getByteBuffer(com.google.common.hash.HashCode input) DataResult<com.google.common.hash.HashCode> getGeneric(com.google.common.hash.HashCode input, com.google.common.hash.HashCode key) getIntStream(com.google.common.hash.HashCode input) DataResult<Consumer<Consumer<com.google.common.hash.HashCode>>> getList(com.google.common.hash.HashCode input) getLongStream(com.google.common.hash.HashCode input) DataResult<MapLike<com.google.common.hash.HashCode>> getMap(com.google.common.hash.HashCode input) DataResult<Consumer<BiConsumer<com.google.common.hash.HashCode, com.google.common.hash.HashCode>>> getMapEntries(com.google.common.hash.HashCode input) DataResult<Stream<Pair<com.google.common.hash.HashCode, com.google.common.hash.HashCode>>> getMapValues(com.google.common.hash.HashCode input) getNumberValue(com.google.common.hash.HashCode input) getNumberValue(com.google.common.hash.HashCode input, Number defaultValue) DataResult<Stream<com.google.common.hash.HashCode>> getStream(com.google.common.hash.HashCode input) getStringValue(com.google.common.hash.HashCode input) private static com.google.common.hash.HasherhashMap(com.google.common.hash.Hasher hasher, Map<com.google.common.hash.HashCode, com.google.common.hash.HashCode> map) private static com.google.common.hash.HasherhashMap(com.google.common.hash.Hasher hasher, Stream<Pair<com.google.common.hash.HashCode, com.google.common.hash.HashCode>> map) private booleanisEmpty(com.google.common.hash.HashCode value) ListBuilder<com.google.common.hash.HashCode> RecordBuilder<com.google.common.hash.HashCode> DataResult<com.google.common.hash.HashCode> mergeToList(com.google.common.hash.HashCode prefix, com.google.common.hash.HashCode value) Only successful if first argument is a list/array or emptyDataResult<com.google.common.hash.HashCode> mergeToList(com.google.common.hash.HashCode prefix, List<com.google.common.hash.HashCode> values) DataResult<com.google.common.hash.HashCode> mergeToMap(com.google.common.hash.HashCode prefix, com.google.common.hash.HashCode key, com.google.common.hash.HashCode value) Only successful if first argument is a map or emptyDataResult<com.google.common.hash.HashCode> mergeToMap(com.google.common.hash.HashCode prefix, MapLike<com.google.common.hash.HashCode> values) DataResult<com.google.common.hash.HashCode> mergeToMap(com.google.common.hash.HashCode prefix, Map<com.google.common.hash.HashCode, com.google.common.hash.HashCode> values) com.google.common.hash.HashCodecom.google.common.hash.HashCodetoString()private static <T> DataResult<T> com.google.common.hash.HashCodeupdate(com.google.common.hash.HashCode input, String key, Function<com.google.common.hash.HashCode, com.google.common.hash.HashCode> function) com.google.common.hash.HashCodeupdateGeneric(com.google.common.hash.HashCode input, com.google.common.hash.HashCode key, Function<com.google.common.hash.HashCode, com.google.common.hash.HashCode> function) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface DynamicOps
compressMaps, convertList, convertMap, mergeToPrimitive, withDecoder, withEncoder, withParser
-
Field Details
-
TAG_EMPTY
private static final byte TAG_EMPTY- See Also:
-
TAG_MAP_START
private static final byte TAG_MAP_START- See Also:
-
TAG_MAP_END
private static final byte TAG_MAP_END- See Also:
-
TAG_LIST_START
private static final byte TAG_LIST_START- See Also:
-
TAG_LIST_END
private static final byte TAG_LIST_END- See Also:
-
TAG_BYTE
private static final byte TAG_BYTE- See Also:
-
TAG_SHORT
private static final byte TAG_SHORT- See Also:
-
TAG_INT
private static final byte TAG_INT- See Also:
-
TAG_LONG
private static final byte TAG_LONG- See Also:
-
TAG_FLOAT
private static final byte TAG_FLOAT- See Also:
-
TAG_DOUBLE
private static final byte TAG_DOUBLE- See Also:
-
TAG_STRING
private static final byte TAG_STRING- See Also:
-
TAG_BOOLEAN
private static final byte TAG_BOOLEAN- See Also:
-
TAG_BYTE_ARRAY_START
private static final byte TAG_BYTE_ARRAY_START- See Also:
-
TAG_BYTE_ARRAY_END
private static final byte TAG_BYTE_ARRAY_END- See Also:
-
TAG_INT_ARRAY_START
private static final byte TAG_INT_ARRAY_START- See Also:
-
TAG_INT_ARRAY_END
private static final byte TAG_INT_ARRAY_END- See Also:
-
TAG_LONG_ARRAY_START
private static final byte TAG_LONG_ARRAY_START- See Also:
-
TAG_LONG_ARRAY_END
private static final byte TAG_LONG_ARRAY_END- See Also:
-
EMPTY_PAYLOAD
private static final byte[] EMPTY_PAYLOAD -
FALSE_PAYLOAD
private static final byte[] FALSE_PAYLOAD -
TRUE_PAYLOAD
private static final byte[] TRUE_PAYLOAD -
EMPTY_MAP_PAYLOAD
public static final byte[] EMPTY_MAP_PAYLOAD -
EMPTY_LIST_PAYLOAD
public static final byte[] EMPTY_LIST_PAYLOAD -
UNSUPPORTED_OPERATION_ERROR
-
HASH_COMPARATOR
-
MAP_ENTRY_ORDER
private static final Comparator<Map.Entry<com.google.common.hash.HashCode, com.google.common.hash.HashCode>> MAP_ENTRY_ORDER -
MAPLIKE_ENTRY_ORDER
private static final Comparator<Pair<com.google.common.hash.HashCode, com.google.common.hash.HashCode>> MAPLIKE_ENTRY_ORDER -
CRC32C_INSTANCE
-
hashFunction
private final com.google.common.hash.HashFunction hashFunction -
empty
private final com.google.common.hash.HashCode empty -
emptyMap
private final com.google.common.hash.HashCode emptyMap -
emptyList
private final com.google.common.hash.HashCode emptyList -
trueHash
private final com.google.common.hash.HashCode trueHash -
falseHash
private final com.google.common.hash.HashCode falseHash
-
-
Constructor Details
-
HashOps
public HashOps(com.google.common.hash.HashFunction hashFunction)
-
-
Method Details
-
empty
public com.google.common.hash.HashCode empty()- Specified by:
emptyin interfaceDynamicOps<com.google.common.hash.HashCode>
-
emptyMap
public com.google.common.hash.HashCode emptyMap()- Specified by:
emptyMapin interfaceDynamicOps<com.google.common.hash.HashCode>
-
emptyList
public com.google.common.hash.HashCode emptyList()- Specified by:
emptyListin interfaceDynamicOps<com.google.common.hash.HashCode>
-
createNumeric
- Specified by:
createNumericin interfaceDynamicOps<com.google.common.hash.HashCode>
-
createByte
public com.google.common.hash.HashCode createByte(byte value) - Specified by:
createBytein interfaceDynamicOps<com.google.common.hash.HashCode>
-
createShort
public com.google.common.hash.HashCode createShort(short value) - Specified by:
createShortin interfaceDynamicOps<com.google.common.hash.HashCode>
-
createInt
public com.google.common.hash.HashCode createInt(int value) - Specified by:
createIntin interfaceDynamicOps<com.google.common.hash.HashCode>
-
createLong
public com.google.common.hash.HashCode createLong(long value) - Specified by:
createLongin interfaceDynamicOps<com.google.common.hash.HashCode>
-
createFloat
public com.google.common.hash.HashCode createFloat(float value) - Specified by:
createFloatin interfaceDynamicOps<com.google.common.hash.HashCode>
-
createDouble
public com.google.common.hash.HashCode createDouble(double value) - Specified by:
createDoublein interfaceDynamicOps<com.google.common.hash.HashCode>
-
createString
- Specified by:
createStringin interfaceDynamicOps<com.google.common.hash.HashCode>
-
createBoolean
public com.google.common.hash.HashCode createBoolean(boolean value) - Specified by:
createBooleanin interfaceDynamicOps<com.google.common.hash.HashCode>
-
hashMap
private static com.google.common.hash.Hasher hashMap(com.google.common.hash.Hasher hasher, Map<com.google.common.hash.HashCode, com.google.common.hash.HashCode> map) -
hashMap
-
createMap
public com.google.common.hash.HashCode createMap(Stream<Pair<com.google.common.hash.HashCode, com.google.common.hash.HashCode>> map) - Specified by:
createMapin interfaceDynamicOps<com.google.common.hash.HashCode>
-
createMap
public com.google.common.hash.HashCode createMap(Map<com.google.common.hash.HashCode, com.google.common.hash.HashCode> map) - Specified by:
createMapin interfaceDynamicOps<com.google.common.hash.HashCode>
-
createList
- Specified by:
createListin interfaceDynamicOps<com.google.common.hash.HashCode>
-
createByteList
- Specified by:
createByteListin interfaceDynamicOps<com.google.common.hash.HashCode>
-
createIntList
- Specified by:
createIntListin interfaceDynamicOps<com.google.common.hash.HashCode>
-
createLongList
- Specified by:
createLongListin interfaceDynamicOps<com.google.common.hash.HashCode>
-
remove
- Specified by:
removein interfaceDynamicOps<com.google.common.hash.HashCode>
-
mapBuilder
- Specified by:
mapBuilderin interfaceDynamicOps<com.google.common.hash.HashCode>
-
listBuilder
- Specified by:
listBuilderin interfaceDynamicOps<com.google.common.hash.HashCode>
-
toString
-
convertTo
- Specified by:
convertToin interfaceDynamicOps<com.google.common.hash.HashCode>
-
getNumberValue
- Specified by:
getNumberValuein interfaceDynamicOps<com.google.common.hash.HashCode>
-
set
public com.google.common.hash.HashCode set(com.google.common.hash.HashCode input, String key, com.google.common.hash.HashCode value) - Specified by:
setin interfaceDynamicOps<com.google.common.hash.HashCode>
-
update
public com.google.common.hash.HashCode update(com.google.common.hash.HashCode input, String key, Function<com.google.common.hash.HashCode, com.google.common.hash.HashCode> function) - Specified by:
updatein interfaceDynamicOps<com.google.common.hash.HashCode>
-
updateGeneric
public com.google.common.hash.HashCode updateGeneric(com.google.common.hash.HashCode input, com.google.common.hash.HashCode key, Function<com.google.common.hash.HashCode, com.google.common.hash.HashCode> function) - Specified by:
updateGenericin interfaceDynamicOps<com.google.common.hash.HashCode>
-
unsupported
-
get
public DataResult<com.google.common.hash.HashCode> get(com.google.common.hash.HashCode input, String key) - Specified by:
getin interfaceDynamicOps<com.google.common.hash.HashCode>
-
getGeneric
public DataResult<com.google.common.hash.HashCode> getGeneric(com.google.common.hash.HashCode input, com.google.common.hash.HashCode key) - Specified by:
getGenericin interfaceDynamicOps<com.google.common.hash.HashCode>
-
getNumberValue
- Specified by:
getNumberValuein interfaceDynamicOps<com.google.common.hash.HashCode>
-
getBooleanValue
- Specified by:
getBooleanValuein interfaceDynamicOps<com.google.common.hash.HashCode>
-
getStringValue
- Specified by:
getStringValuein interfaceDynamicOps<com.google.common.hash.HashCode>
-
isEmpty
private boolean isEmpty(com.google.common.hash.HashCode value) -
mergeToList
public DataResult<com.google.common.hash.HashCode> mergeToList(com.google.common.hash.HashCode prefix, com.google.common.hash.HashCode value) Description copied from interface:DynamicOpsOnly successful if first argument is a list/array or empty- Specified by:
mergeToListin interfaceDynamicOps<com.google.common.hash.HashCode>
-
mergeToList
public DataResult<com.google.common.hash.HashCode> mergeToList(com.google.common.hash.HashCode prefix, List<com.google.common.hash.HashCode> values) - Specified by:
mergeToListin interfaceDynamicOps<com.google.common.hash.HashCode>
-
mergeToMap
public DataResult<com.google.common.hash.HashCode> mergeToMap(com.google.common.hash.HashCode prefix, com.google.common.hash.HashCode key, com.google.common.hash.HashCode value) Description copied from interface:DynamicOpsOnly successful if first argument is a map or empty- Specified by:
mergeToMapin interfaceDynamicOps<com.google.common.hash.HashCode>
-
mergeToMap
public DataResult<com.google.common.hash.HashCode> mergeToMap(com.google.common.hash.HashCode prefix, Map<com.google.common.hash.HashCode, com.google.common.hash.HashCode> values) - Specified by:
mergeToMapin interfaceDynamicOps<com.google.common.hash.HashCode>
-
mergeToMap
public DataResult<com.google.common.hash.HashCode> mergeToMap(com.google.common.hash.HashCode prefix, MapLike<com.google.common.hash.HashCode> values) - Specified by:
mergeToMapin interfaceDynamicOps<com.google.common.hash.HashCode>
-
getMapValues
public DataResult<Stream<Pair<com.google.common.hash.HashCode, com.google.common.hash.HashCode>>> getMapValues(com.google.common.hash.HashCode input) - Specified by:
getMapValuesin interfaceDynamicOps<com.google.common.hash.HashCode>
-
getMapEntries
public DataResult<Consumer<BiConsumer<com.google.common.hash.HashCode, com.google.common.hash.HashCode>>> getMapEntries(com.google.common.hash.HashCode input) - Specified by:
getMapEntriesin interfaceDynamicOps<com.google.common.hash.HashCode>
-
getStream
public DataResult<Stream<com.google.common.hash.HashCode>> getStream(com.google.common.hash.HashCode input) - Specified by:
getStreamin interfaceDynamicOps<com.google.common.hash.HashCode>
-
getList
public DataResult<Consumer<Consumer<com.google.common.hash.HashCode>>> getList(com.google.common.hash.HashCode input) - Specified by:
getListin interfaceDynamicOps<com.google.common.hash.HashCode>
-
getMap
public DataResult<MapLike<com.google.common.hash.HashCode>> getMap(com.google.common.hash.HashCode input) - Specified by:
getMapin interfaceDynamicOps<com.google.common.hash.HashCode>
-
getByteBuffer
- Specified by:
getByteBufferin interfaceDynamicOps<com.google.common.hash.HashCode>
-
getIntStream
- Specified by:
getIntStreamin interfaceDynamicOps<com.google.common.hash.HashCode>
-
getLongStream
- Specified by:
getLongStreamin interfaceDynamicOps<com.google.common.hash.HashCode>
-