Class RelationImpl<K,​V>

java.lang.Object
org.refcodes.struct.RelationImpl<K,​V>
Type Parameters:
K - The key's type
V - The value's type
All Implemented Interfaces:
org.refcodes.mixin.KeyAccessor<K>, org.refcodes.mixin.ValueAccessor<V>, Relation<K,​V>
Direct Known Subclasses:
AttributeImpl, PropertyImpl, RelationImpl.RelationBuilderImpl

public class RelationImpl<K,​V>
extends Object
implements Relation<K,​V>
Implementation of the Relation interface.
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static class  RelationImpl.RelationBuilderImpl<K,​V>
    Implementation of the Relation.RelationBuilder interface.

    Nested classes/interfaces inherited from interface org.refcodes.mixin.KeyAccessor

    org.refcodes.mixin.KeyAccessor.KeyBuilder<K extends Object,​B extends org.refcodes.mixin.KeyAccessor.KeyBuilder<K,​B>>, org.refcodes.mixin.KeyAccessor.KeyMutator<K extends Object>, org.refcodes.mixin.KeyAccessor.KeyProperty<K extends Object>

    Nested classes/interfaces inherited from interface org.refcodes.struct.Relation

    Relation.RelationBuilder<K,​V>

    Nested classes/interfaces inherited from interface org.refcodes.mixin.ValueAccessor

    org.refcodes.mixin.ValueAccessor.ValueBuilder<V extends Object,​B extends org.refcodes.mixin.ValueAccessor.ValueBuilder<V,​B>>, org.refcodes.mixin.ValueAccessor.ValueMutator<V extends Object>, org.refcodes.mixin.ValueAccessor.ValueProperty<V extends Object>
  • Field Summary

    Fields
    Modifier and Type Field Description
    protected K _key  
    protected V _value  
  • Constructor Summary

    Constructors
    Modifier Constructor Description
    protected RelationImpl()
    Instantiates a new relation impl.
      RelationImpl​(K aKey, V aValue)
    Constructs a Relation.
  • Method Summary

    Modifier and Type Method Description
    K getKey()
    V getValue()
    String toString()

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.refcodes.mixin.ValueAccessor

    getValueOr
  • Field Details

    • _key

      protected K _key
    • _value

      protected V _value
  • Constructor Details

    • RelationImpl

      protected RelationImpl()
      Instantiates a new relation impl.
    • RelationImpl

      public RelationImpl​(K aKey, V aValue)
      Constructs a Relation.
      Parameters:
      aKey - The key for the key-value property.
      aValue - The value for the key-value property.
  • Method Details

    • getKey

      public K getKey()
      Specified by:
      getKey in interface org.refcodes.mixin.KeyAccessor<K>
    • getValue

      public V getValue()
      Specified by:
      getValue in interface org.refcodes.mixin.ValueAccessor<K>
    • toString

      public String toString()
      Overrides:
      toString in class Object