blob: 2e6c42a513d21f5551b252d17621623fc722c1bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
/*
* Roughly Enough Items by Danielshe.
* Licensed under the MIT License.
*/
package me.shedaniel.rei.api;
import me.shedaniel.rei.impl.ObjectHolderImpl;
import org.jetbrains.annotations.ApiStatus;
public interface ObjectHolder<T> {
@SuppressWarnings("deprecation")
static <T> ObjectHolder<T> of(T o) {
return new ObjectHolderImpl<>(o);
}
@Deprecated
@ApiStatus.ScheduledForRemoval
default int intValue() {
return (int) (Object) value();
}
@Deprecated
@ApiStatus.ScheduledForRemoval
default long longValue() {
return (long) (Object) value();
}
@Deprecated
@ApiStatus.ScheduledForRemoval
default boolean booleanValue() {
return (boolean) (Object) value();
}
@Deprecated
@ApiStatus.ScheduledForRemoval
default float floatValue() {
return (float) (Object) value();
}
@Deprecated
@ApiStatus.ScheduledForRemoval
default double doubleValue() {
return (double) (Object) value();
}
@Deprecated
@ApiStatus.ScheduledForRemoval
default String stringValue() {
return (String) value();
}
T value();
}
|