canMove
Which Types can be moved
@param nsType
@return
500913
public boolean canMove(NsType nsType) {
		boolean rv;
		switch(nsType) {
			case DOT:
			case ROOT:
			case COMPANY:
			case UNKNOWN:
				rv = false;
				break;
			default:
				rv = true;
		}
		return rv;
	}
755360
static boolean isUnaryOperatorType(Token type) {
    switch (type) {
      case DELPROP:
      case VOID:
      case TYPEOF:
      case POS:
      case NEG:
      case BITNOT:
      case NOT:
        return true;

      default:
        return false;
    }
  }
174525
public static boolean isSerializable( JType type ) {
        return null != type.isInterface() && Serializable.class.getName().equals( type.getQualifiedSourceName() );
    }
18580
private static <T> ConvertibleType<T> of(Type genericType) {
        final Class<T> targetType;
        if (genericType instanceof Class) {
            targetType = (Class<T>)genericType;
        } else if (genericType instanceof ParameterizedType) {
            targetType = (Class<T>)((ParameterizedType)genericType).getRawType();
        } else if (genericType.toString().equals("byte[]")) {
            targetType = (Class<T>)byte[].class;
        } else {
            targetType = (Class<T>)Object.class;
        }
        final TypedMap<T> annotations = StandardAnnotationMaps.<T>of(targetType);
        return new ConvertibleType<T>(genericType, annotations, null);
    }
599871
private static boolean isAccessible(final Class<?> type) {
        Class<?> cls = type;
        while (cls != null) {
            if (!Modifier.isPublic(cls.getModifiers())) {
                return false;
            }
            cls = cls.getEnclosingClass();
        }
        return true;
    }
1152864
static boolean isJavaBaseAssignable( Class<?> lhsType, Class<?> rhsType )
    {
        /*
            Assignment to loose type, defer to bsh extensions
            Note: we could shortcut this here:
            if ( lhsType == null ) return true;
            rather than forcing another round.  It's not strictly a Java issue,
            so does it belong here?
        */
        if ( lhsType == null )
            return false;

        // null rhs type corresponds to type of Primitive.NULL assignable to any
        // object type but we give preference here to string types
        if ( rhsType == null )
            return lhsType == String.class;

        if ( lhsType.isPrimitive() && rhsType.isPrimitive() ) {
            if ( lhsType == rhsType )
                return true;

            // handle primitive widening conversions - JLS 5.1.2
            if ( NUMBER_ORDER.containsKey(rhsType)
                    && NUMBER_ORDER.containsKey(lhsType) )
                return NUMBER_ORDER.get(rhsType) < NUMBER_ORDER.get(lhsType);
        }
        else if ( lhsType.isAssignableFrom(rhsType) )
            return true;

        return false;
    }
180632
private boolean writeLockAvailable(int type) {
        if (mReadLocks == 0 && mWriteLockHeld == null) {
            return (type == UPGRADABLE) ? true : mUpgradableLockHeld == null;
        }
        return false;
    }
1079694
def canMove(self):
        
        if not self.filled():
            return True

        for y in self.__size_range:
            for x in self.__size_range:
                c = self.getCell(x, y)
                if (x < self.__size-1 and c == self.getCell(x+1, y)) \
                   or (y < self.__size-1 and c == self.getCell(x, y+1)):
                    return True

        return False
428128
public static Type boxedType(Type type) {
        if (type instanceof Class<?>) {
            return boxedClass((Class<?>) type);
        } else {
            return type;
        }
    }
246851
static public MobileAddress.Type parseType(String type) {
        if (type.equalsIgnoreCase("network")) {
            return MobileAddress.Type.NETWORK;
        } else if (type.equalsIgnoreCase("national")) {
            return MobileAddress.Type.NATIONAL;
        } else if (type.equalsIgnoreCase("alphanumeric")) {
            return MobileAddress.Type.ALPHANUMERIC;
        } else if (type.equalsIgnoreCase("international")) {
            return MobileAddress.Type.INTERNATIONAL;
        } else if (type.equalsIgnoreCase("push_destination")) {
            return MobileAddress.Type.PUSH_DESTINATION;
        } else {
            return null;
        }
    }
671886
public BuildableType.Builder type(Type type) {
    this.type = Objects.requireNonNull(type);
    _unsetProperties.remove(Property.TYPE);
    return (BuildableType.Builder) this;
  }
259275
public Optional<MapperInstance> getKeySerializer( JType type ) {
        return Optional.fromNullable( keySerializers.get( type.getQualifiedSourceName() ) );
    }
671720
@Override
    public boolean canImport(String mediaType) {
        return (MediaType.NATIVE_MEDIATYPE_SYNTAX_MAP.containsKey(mediaType) ||
                this.serviceTransformationEngine.canTransform(mediaType));
    }
59751
public static boolean isIntrospectable(final Class<?> type) {
        return !isEnumType(type)
                && !isArrayType(type)
                && !(isCollectionType(type) && isJdkBuiltIn(type))
                && !(isMapType(type) && isJdkBuiltIn(type));
    }
647043
public RuntimeTypeAdapterFactory<T> registerSubtype(Class<? extends T> type) {
    return registerSubtype(type, type.getSimpleName());
  }
1259822
public boolean isSupported(TypeDesc propertyType) {
        if (propertyType.toPrimitiveType() != null) {
            return true;
        }
        if (propertyType == TypeDesc.STRING || propertyType == TypeDesc.forClass(byte[].class)) {
            return true;
        }
        Class clazz = propertyType.toClass();
        if (clazz != null) {
            return Lob.class.isAssignableFrom(clazz) ||
                BigInteger.class.isAssignableFrom(clazz) ||
                BigDecimal.class.isAssignableFrom(clazz);
        }
        return false;
    }
1344017
public Boolean checkType(String type) {
    if (mtasPositionType == null) {
      return false;
    } else {
      return mtasPositionType.equals(type);
    }
  }