/*
(non-Javadoc)

@see com.oath.cyclops.lambda.monads.Pure#unit(java.lang.Object)
969061
@Override
    public <T> Future<T> unit(final T unit) {
        return new Future<T>(
                              CompletableFuture.completedFuture(unit));
    }
889384
protected void addUnit(final IAnnotationUnit unit) {
		int raterIdx = unit.getRaterIdx();
		if (raterIdx >= units.size()) {
			for (int i = units.size(); i < raterIdx; i++) {
                units.add(null);
            }
			units.add(unit);
		}
        else {
            units.set(raterIdx, unit);
        }

		if (unit.getCategory() != null) {
            nonNullCount++;
        }
	}
482458
def _unit(g):
    """"""
    nt_unit_rule = get_any_nt_unit_rule(g)
    while nt_unit_rule:
        g = _remove_unit_rule(g, nt_unit_rule)
        nt_unit_rule = get_any_nt_unit_rule(g)
    return g
356514
public TypeChecker createTypeChecker(CompilationUnit unit) {

        TypeChecker typeChecker = super.createTypeChecker(unit);
        CompileListener typeCheckerListener = getTypeCheckerListener();
        if (typeCheckerListener != null) {
            typeChecker.addCompileListener(typeCheckerListener);
        }

        return typeChecker;
    }
1240689
function (op, other) {
        return new(tree.Dimension)
                  (tree.operate(op, this.value, other.value),
                  this.unit || other.unit);
    }
724567
public void assign(final Object a) {
		setDerived(false);
		setValue(a);
		setDerived((a == null) ? false : true);
		m_notKnown = false;
	}
613642
@Override
    public double max(TimeUnit unit) {
        return TimeUtils.convert(max.poll(), TimeUnit.MILLISECONDS, unit);
    }
1271605
function unit(unit, type){
  utils.assertType(unit, 'unit', 'unit');

  // Assign
  if (type) {
    utils.assertString(type, 'type');
    return new nodes.Unit(unit.val, type.string);
  } else {
    return unit.type || '';
  }
}
204408
public void setUnit(final String UNIT) {
        if (null == unit) {
            _unit = UNIT;
            fireTileEvent(VISIBILITY_EVENT);
            fireTileEvent(REDRAW_EVENT);
        } else {
            unit.set(UNIT);
        }
    }
1107850
def __set_unit(self, value):
        '''
        
        '''
        if value in UNITS:
            value = value.upper()

        self.__unit = value
300721
@Override
    public long get(TemporalUnit unit) {
        if (unit == ChronoUnit.YEARS) {
            return years;
        } else if (unit == ChronoUnit.MONTHS) {
            return months;
        } else if (unit == ChronoUnit.DAYS) {
            return days;
        } else {
            throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit);
        }
    }
744600
public <T> T convert(Object object, Class<T> clazz) {
        if (object == null) {
            return null;
        }

        return mapper.convertValue(object, clazz);
    }
49304
public static UnitRequest create(Class<? extends Unit> unitClass) {
        Unit unit = LocalUnitsManager.getUnitByUnitClass(unitClass);
        return create(unit.getGroup().getName(), unit.getName());
    }
438052
def units(self, val):
        """"""
        if isinstance(val, units.Unit):
            self._unit = val
        else:
            self._unit = units(val)
435126
function unit(value, property) {
	let ignored = ['font-weight', 'opacity', 'content', 'columns', 'column-count'];

	if (ignored.includes(property) || property === false || value === 0 || /\s/.test(value)) {
		return value.toString();
	}

	if (! isUnit(value) && isNumber(value)) {
		if (property === 'line-height') {
			value += units.lineHeight;
		} else {
			value += units.default;
		}
	}

	return value;
}
267709
private void set(Unit unit, Rational rational, Unit base, boolean replace) {
    Map<Unit, UnitFactor> map = factors.get(unit);
    if (map == null) {
      map = new EnumMap<>(Unit.class);
      factors.put(unit, map);
    }
    if (replace || !map.containsKey(base)) {
      map.put(base,  new UnitFactor(rational, base));
    }
  }
788701
public static void init(Object object)
	{
		if (object instanceof Collection)
		{
			initCollection((Collection<?>)object);
		}
		else if (object instanceof Marshalizable)
		{
			Marshalizable m = (Marshalizable)object;
			m.marshallize();
		}
	}