Package tech.ytsaurus.ysontree
Class YTreeNodeImpl
- java.lang.Object
-
- tech.ytsaurus.ysontree.YTreeNodeImpl
-
- All Implemented Interfaces:
YTreeNode
- Direct Known Subclasses:
YTreeBooleanNodeImpl,YTreeDoubleNodeImpl,YTreeEntityNodeImpl,YTreeIntegerNodeImpl,YTreeListNodeImpl,YTreeMapNodeImpl,YTreeStringNodeImpl
public abstract class YTreeNodeImpl extends java.lang.Object implements YTreeNode
-
-
Constructor Summary
Constructors Constructor Description YTreeNodeImpl(java.util.Map<java.lang.String,YTreeNode> attributes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearAttributes()booleancontainsAttribute(java.lang.String key)booleancontainsAttributes()protected booleanequalsBase(YTreeNode another0)java.util.Optional<YTreeNode>getAttribute(java.lang.String key)YTreeNodegetAttributeOrThrow(java.lang.String key)YTreeNodegetAttributeOrThrow(java.lang.String key, java.util.function.Supplier<java.lang.String> createMessage)java.util.Map<java.lang.String,YTreeNode>getAttributes()Get attribute map of an object.protected inthashCodeBase()java.util.Optional<YTreeNode>putAttribute(java.lang.String key, YTreeNode value)java.util.Optional<YTreeNode>removeAttribute(java.lang.String key)byte[]toBinary()Get binary yson representation of value.java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface tech.ytsaurus.ysontree.YTreeNode
asList, asMap, attributeKeys, attributeValues, booleanNode, boolValue, bytesValue, cast, doubleNode, doubleValue, entityNode, floatValue, integerNode, intValue, isBooleanNode, isDoubleNode, isEntityNode, isIntegerNode, isListNode, isMapNode, isStringNode, listNode, longValue, mapNode, scalarNode, stringNode, stringValue
-
-
-
-
Constructor Detail
-
YTreeNodeImpl
public YTreeNodeImpl(@Nullable java.util.Map<java.lang.String,YTreeNode> attributes)
-
-
Method Detail
-
getAttributes
public java.util.Map<java.lang.String,YTreeNode> getAttributes()
Description copied from interface:YTreeNodeGet attribute map of an object. Return empty map if object doesn't have attributes.- Specified by:
getAttributesin interfaceYTreeNode
-
clearAttributes
public void clearAttributes()
- Specified by:
clearAttributesin interfaceYTreeNode
-
containsAttributes
public boolean containsAttributes()
- Specified by:
containsAttributesin interfaceYTreeNode
-
containsAttribute
public boolean containsAttribute(java.lang.String key)
- Specified by:
containsAttributein interfaceYTreeNode
-
removeAttribute
public java.util.Optional<YTreeNode> removeAttribute(java.lang.String key)
- Specified by:
removeAttributein interfaceYTreeNode
-
putAttribute
public java.util.Optional<YTreeNode> putAttribute(java.lang.String key, YTreeNode value)
- Specified by:
putAttributein interfaceYTreeNode
-
getAttribute
public java.util.Optional<YTreeNode> getAttribute(java.lang.String key)
- Specified by:
getAttributein interfaceYTreeNode
-
getAttributeOrThrow
public YTreeNode getAttributeOrThrow(java.lang.String key)
- Specified by:
getAttributeOrThrowin interfaceYTreeNode
-
getAttributeOrThrow
public YTreeNode getAttributeOrThrow(java.lang.String key, java.util.function.Supplier<java.lang.String> createMessage)
- Specified by:
getAttributeOrThrowin interfaceYTreeNode
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toBinary
public byte[] toBinary()
Description copied from interface:YTreeNodeGet binary yson representation of value.
-
hashCodeBase
protected int hashCodeBase()
-
equalsBase
protected boolean equalsBase(YTreeNode another0)
-
-