Tag:generic paradigm

  • Android Foundation Series (1) Java generics

    Time:2021-6-14

    sketch Java generics is a new feature introduced in j2se1.5. Its essence is parameterized type. That is to say, the operated data type is specified as a type parameter. This parameter type can be used in the creation of classes, interfaces and methods, which are called generic class, generic interface and generic method respectively.Let’s understand […]

  • Gson of Java source code analysis

    Time:2021-6-11

    1: To the official website, the main function of gson is the mutual conversion between Java objects and JSON. Let’s take a look at the simplest example @AllArgsConstructor public static class Book{ private Integer id; private String name; } public static void main(String[] args) { Map<String,Book> map = Maps.newHashMap(); map.put(“1″, new Book(1,”1”)); map.put(“2″, new Book(2,”2”)); […]

  • A detailed explanation of dart grammar

    Time:2021-6-10

    If you want to learn flutter, please pay attention to this columnFlutter series (1) — a detailed introductionFlutter series (2) — comparison with react nativeFlutter series (3) — environment building (Windows)Flutter series (4) — HelloWorldA detailed explanation of dart language (1) — a detailed introductionA detailed explanation of dart language (2) — basic grammarA detailed […]

  • Upgrade user experience through. Net nativeaot

    Time:2021-6-7

    preface TypedocConverterIt’s a project that I started earlier because I helped to maintain the Monaco editor uwp, but because there are too many APIs in the Monaco editor, it’s not cost-effective to write the type binding of C #. This tool can directly generate the corresponding C # type binding code from the JSON file […]

  • Out and in in kotlin language

    Time:2021-4-30

    PS: read the original, you can get the source code In kotlin language, out means covariance and in means inversion; Covariance and inversion are not unique concepts of kotlin, such as Java and C #; In order to understand the out and in of kotlin, let’s use Java generics as an example. We need to […]

  • Will Arts Week 2 | leetcode 31 | go support value methods and pointer methods in generics | go

    Time:2021-4-30

    ARTS Arts is an activity launched by Chen Hao in the geek time column. The purpose is to keep learning through sharing. Each person writes an arts every week: algorithm is an algorithm problem, review is to read an English article, technology / tips is to share a small technology, share is to share a […]

  • 010 drop check of rust Necromancer

    Time:2021-4-25

    introduce The video recorded in this series is mainly on station BRust necromancer learning video The source code of rust is as follows:github.com/anonymousGiga Note content A piece of code struct Inspector<‘a>(&’a u8); struct World<‘a> { inspector: Option<Inspector<‘a>>, days: Box<u8>, } fn main() { let mut world = World { inspector: None, days: Box::new(1), }; world.inspector […]

  • Review Java generics, take you more in-depth understanding of it, better use it!

    Time:2021-3-3

    1. Introduction Java generics are introduced in jdk5.0 to reduce errors and add an extra abstraction layer to the types.This article will briefly introduce generics in Java, the goals behind generics, and how to use generics to improve the quality of code. 2. Why use generics? Imagine a scenario where we want to create a […]

  • Trust learning: generics data types

    Time:2021-2-25

    We can use generics to create definitions for items such as function signatures or structures, which can then be used for many different concrete data types. First, let’s look at how to use generics to define functions, structures, enumerations, and methods. Then we’ll discuss how generics affect code performance. In function definitionFor example, if we […]

  • Java Basics: a deep understanding of generics

    Time:2021-2-19

    1. Java generics 2. How to implement Java generics? Java generics are implemented throughType Erasure It’s true! That is, Java generics are pseudo generics. During compilation, all generics information will be erased. Therefore, the java compiler will find possible errors as much as possible at compile time, but it still can’t find the type conversion […]

  • Dart tutorial 03 – classes, generics

    Time:2021-2-11

    We learned in the first partDart tutorial 02 – control flow, exceptionNow let’s move on to classes and generics in dart. Class Here are the methods to declare a simple class in dart and create an instance of it. Add instance variables and constructors to the class Dart provides a concise syntax for constructor initialization. […]

  • What is the function of Java lambda learning notes

    Time:2021-2-11

    Don’t talk about the source code 1. Main method public static void main(String[] args) { Function<String, Integer> s = Integer::parseInt; s.apply(“10”); } Let’s look at the next section 2. Decompile javap -v -p StreamTest give the result as follows Warning: the binary streamtest contains com.cui.subject . java.function.StreamTest Classfile /E:/WorkSpace/subject/java/target/classes/com/cui/subject/java/function/StreamTest.class Last modified 2020-6-15; size 1311 bytes […]