Fluent Interfaces
962772
public function setString($string)
    {
        $this->string = $string;
        $this->hash = sha1($this->string);
        return $this;
    }
1268139
def action_fluents(self) -> Dict[str, PVariable]:
        ''''''
        return { str(pvar): pvar for pvar in self.pvariables if pvar.is_action_fluent() }
412658
public <X> X newProxy(Class<X> interfaces) {
		return (X) newProxy(new Class[] {interfaces});
	}
442717
def cycle_interface(self, increment=1):
        """"""
        interfaces = [i for i in netifaces.interfaces() if i not in self.ignore_interfaces]
        if self.interface in interfaces:
            next_index = (interfaces.index(self.interface) + increment) % len(interfaces)
            self.interface = interfaces[next_index]
        elif len(interfaces) > 0:
            self.interface = interfaces[0]

        if self.network_traffic:
            self.network_traffic.clear_counters()
            self.kbs_arr = [0.0] * self.graph_width
468515
def set_implemented_interfaces(cls, interfaces):
    
    setattr(
        cls,
        '__interfaces__',
        frozenset(
            six.moves.reduce(
                lambda x, y: x.union(y),
                map(operator.attrgetter('implied'), interfaces),
                set()
            )
        )
    )
205889
def interfaces(self) -> GraphQLInterfaceList:
        """"""
        try:
            interfaces = resolve_thunk(self._interfaces)
        except GraphQLError:
            raise
        except Exception as error:
            raise TypeError(f"{self.name} interfaces cannot be resolved: {error}")
        if interfaces is None:
            interfaces = []
        if not isinstance(interfaces, (list, tuple)):
            raise TypeError(
                f"{self.name} interfaces must be a list/tuple"
                " or a function which returns a list/tuple."
            )
        if not all(isinstance(value, GraphQLInterfaceType) for value in interfaces):
            raise TypeError(f"{self.name} interfaces must be GraphQLInterface objects.")
        return interfaces[:]
271859
function &interfaces()
    {
        $interfaces = NULL;
        foreach ($this->_classes as $name => $interface) {
            if ($interface->isInterface()) {
                $interfaces[$name] =& $this->_classes[$name];
            }
        }

        return $interfaces;
    }
27519
def implementations(interface, recurse=True, abstract=False):
    """"""
    result = []
    find_implementations(interface, recurse, abstract, result)
    return result
1273163
def p_NonAnyType_interface(p):
  """"""
  p[0] = helper.unwrapTypeSuffix(model.InterfaceType(name=p[1]), p[2])
1202279
public static <T> FluentIterable<T> toFluentIterable(Cursor cursor, Function<? super Cursor, T> singleRowTransform) {
    List<T> transformed = Lists.newArrayList();
    if (cursor != null) {
      for (int i = 0; cursor.moveToPosition(i); i++) {
        transformed.add(singleRowTransform.apply(cursor));
      }
    }
    return FluentIterable.from(transformed);
  }
862552
def implements(*interfaces):
        
        import sys

        frame = sys._getframe(1)
        locals_ = frame.f_locals

        # Some sanity checks
        msg = 'implements() can only be used in a class definition'
        assert locals_ is not frame.f_globals and '__module__' in locals_, msg

        locals_.setdefault('_implements', []).extend(interfaces)
351892
private List<List<IType>> extractContextTypes( List<? extends IInvocableType>  funcTypes )
  {
    if( funcTypes != null )
    {
      ArrayList<List<IType>> returnList = new ArrayList<>();
      for( IInvocableType funcType : funcTypes )
      {
        for( int i = 0; i < funcType.getParameterTypes().length; i++ )
        {
          IType paramType = funcType.getParameterTypes()[i];
          if( i >= returnList.size() )
          {
            returnList.add( new ArrayList<>() );
          }
          List<IType> paramTypeList = returnList.get( i );
          if( !paramTypeList.contains( paramType ) )
          {
            paramTypeList.add( paramType );
          }
        }
      }
      return returnList;
    }
    else
    {
      return Collections.emptyList();
    }
  }
107194
private void expectInterfaceProperty(
      Node n, ObjectType instance, ObjectType implementedInterface, String prop) {
    StaticTypedSlot propSlot = instance.getSlot(prop);
    if (propSlot == null) {
      // Not implemented
      String sourceName = n.getSourceFileName();
      sourceName = nullToEmpty(sourceName);
      registerMismatch(
          instance,
          implementedInterface,
          report(
              JSError.make(
                  n,
                  INTERFACE_METHOD_NOT_IMPLEMENTED,
                  prop,
                  implementedInterface.toString(),
                  instance.toString())));
    } else {
      Node propNode =
          propSlot.getDeclaration() == null ? null : propSlot.getDeclaration().getNode();

      // Fall back on the constructor node if we can't find a node for the
      // property.
      propNode = propNode == null ? n : propNode;

      JSType found = propSlot.getType();
      found = found.restrictByNotNullOrUndefined();

      JSType required
          = implementedInterface.getImplicitPrototype().getPropertyType(prop);
      TemplateTypeMap typeMap = implementedInterface.getTemplateTypeMap();
      if (!typeMap.isEmpty()) {
        TemplateTypeMapReplacer replacer = new TemplateTypeMapReplacer(
            typeRegistry, typeMap);
        required = required.visit(replacer);
      }
      required = required.restrictByNotNullOrUndefined();

      if (!found.isSubtype(required, this.subtypingMode)) {
        // Implemented, but not correctly typed
        FunctionType constructor =
            implementedInterface.toObjectType().getConstructor();
        JSError err =
            JSError.make(
                propNode,
                HIDDEN_INTERFACE_PROPERTY_MISMATCH,
                prop,
                instance.toString(),
                constructor.getTopMostDefiningType(prop).toString(),
                required.toString(),
                found.toString());
        registerMismatch(found, required, err);
        report(err);
      }
    }
  }
885583
def claimInterface(self, interface):
        
        """
        if isinstance(interface, Interface):
            interface = interface.interfaceNumber

        util.claim_interface(self.dev, interface)
        self.__claimed_interface = interface
64056
@Override
	public <T> T getInterface(Class<T> clasz) {
		return ((Invocable) scriptEngine).getInterface(clasz);
	}
898877
def virtual_interface_create(provider, names, **kwargs):
    '''
    

    '''
    client = _get_client()
    return client.extra_action(provider=provider, names=names, action='virtual_interface_create', **kwargs)
195207
protected function typePassthru(Fluent $column)
    {
        return !empty($column->definition) ? $column->definition : $column->realType;
    }