Package edu.wpi.grip.core.sockets
Class SocketHint.SocketHintDecorator<T>
- java.lang.Object
-
- edu.wpi.grip.core.sockets.SocketHint.SocketHintDecorator<T>
-
- All Implemented Interfaces:
SocketHint<T>
- Direct Known Subclasses:
LinkedSocketHint,SocketHint.IdentiferOverridingSocketHintDecorator
- Enclosing interface:
- SocketHint<T>
public abstract static class SocketHint.SocketHintDecorator<T> extends java.lang.Object implements SocketHint<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface edu.wpi.grip.core.sockets.SocketHint
SocketHint.BasicSocketHint<T>, SocketHint.Builder<T>, SocketHint.IdentiferOverridingSocketHintDecorator<T>, SocketHint.SocketHintDecorator<T>, SocketHint.View
-
-
Constructor Summary
Constructors Constructor Description SocketHintDecorator(SocketHint<T> decorated)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<T>createInitialValue()Constructs the initial value if an initial value provider was supplied.protected SocketHint<T>getDecorated()java.util.Optional<T[]>getDomain()A hint at the range of values that this socket can hold.java.lang.StringgetIdentifier()The name for this socket.java.lang.Class<T>getType()java.lang.StringgetTypeLabel()A user-presentable string to represent the type of this socket.SocketHint.ViewgetView()The type of view that this hint reccomends being displayed with.booleanisCompatibleWith(SocketHint other)Determines if this is able to contain the type of value that the other socket hint contains.
-
-
-
Constructor Detail
-
SocketHintDecorator
public SocketHintDecorator(SocketHint<T> decorated)
-
-
Method Detail
-
getDecorated
protected SocketHint<T> getDecorated()
-
getIdentifier
public java.lang.String getIdentifier()
Description copied from interface:SocketHintThe name for this socket.- Specified by:
getIdentifierin interfaceSocketHint<T>
-
getType
public java.lang.Class<T> getType()
- Specified by:
getTypein interfaceSocketHint<T>
-
isCompatibleWith
public boolean isCompatibleWith(SocketHint other)
Description copied from interface:SocketHintDetermines if this is able to contain the type of value that the other socket hint contains.- Specified by:
isCompatibleWithin interfaceSocketHint<T>- Parameters:
other- The other socket hint to check if this hint's type can contain it- Returns:
- True the two can be connected together
-
getView
public SocketHint.View getView()
Description copied from interface:SocketHintThe type of view that this hint reccomends being displayed with.- Specified by:
getViewin interfaceSocketHint<T>
-
getDomain
public java.util.Optional<T[]> getDomain()
Description copied from interface:SocketHintA hint at the range of values that this socket can hold. For numeric types, this can consist of two elements that correspond.- Specified by:
getDomainin interfaceSocketHint<T>
-
getTypeLabel
public java.lang.String getTypeLabel()
Description copied from interface:SocketHintA user-presentable string to represent the type of this socket. This may be empty.- Specified by:
getTypeLabelin interfaceSocketHint<T>
-
createInitialValue
public java.util.Optional<T> createInitialValue()
Description copied from interface:SocketHintConstructs the initial value if an initial value provider was supplied.- Specified by:
createInitialValuein interfaceSocketHint<T>- Returns:
- Optionally, the initial value for the socket
-
-