Class AccessObjectMaskSimple

Object
AccessObjectMaskSimple
All Implemented Interfaces:
AccessObjectMask<ObjectMask>

public class AccessObjectMaskSimple extends Object implements AccessObjectMask<ObjectMask>
Provides access to the simple-case of a list of ObjectMasks.
Author:
Owen Feehan
  • Constructor Details

    • AccessObjectMaskSimple

      public AccessObjectMaskSimple()
  • Method Details

    • objectFor

      public ObjectMask objectFor(ObjectMask element)
      Description copied from interface: AccessObjectMask
      An object-mask for a given element.

      This operation is assumed to involve negligible computational cost.

      Specified by:
      objectFor in interface AccessObjectMask<ObjectMask>
      Parameters:
      element - the element.
      Returns:
      the object-mask.
    • shiftBy

      public ObjectMask shiftBy(ObjectMask element, ReadableTuple3i quantity)
      Description copied from interface: AccessObjectMask
      Positionally-shifts an element by a given quantity in the positive direction.
      Specified by:
      shiftBy in interface AccessObjectMask<ObjectMask>
      Parameters:
      element - the element to shift by.
      quantity - the quantity to shift by.
      Returns:
      a newly created element based on element but positionally-shifted.
    • createFrom

      public ObjectMask createFrom(int index, ObjectMask object)
      Description copied from interface: AccessObjectMask
      Creates an element of type T from an object-representation and index.
      Specified by:
      createFrom in interface AccessObjectMask<ObjectMask>
      Parameters:
      index - the index of the object-representation in terms of the original list.
      object - an object-representation corresponding to this index.
      Returns:
      a newly created element corresponding to the object-representation.
    • clipTo

      public ObjectMask clipTo(ObjectMask element, Extent extent)
      Description copied from interface: AccessObjectMask
      Ensures the element lies within a certain extent.
      Specified by:
      clipTo in interface AccessObjectMask<ObjectMask>
      Parameters:
      element - the element.
      extent - the extent to clip to.
      Returns:
      either a newly created element or the existing element (if no change needs to occur).