All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.javagimmicks.collections8.mapping.DefaultMapping Maven / Gradle / Ivy

There is a newer version: 0.99-alpha1
Show newest version
package net.sf.javagimmicks.collections8.mapping;

import net.sf.javagimmicks.collections8.mapping.Mappings.Mapping;

/**
 * A default immutable {@link Mapping} implementation that stores left and right
 * key in private fields.
 */
public class DefaultMapping extends AbstractMapping
{
   private static final long serialVersionUID = 2942113751287943014L;

   private final L _left;
   private final R _right;

   /**
    * Creates a new instance for the given left and right key.
    * 
    * @param left
    *           the left key of the {@link Mapping}
    * @param right
    *           the right key of the {@link Mapping}
    */
   public DefaultMapping(final L left, final R right)
   {
      _left = left;
      _right = right;
   }

   @Override
   public L getLeftKey()
   {
      return _left;
   }

   @Override
   public R getRightKey()
   {
      return _right;
   }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy