This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.modelmapper.Condition; | |
import org.modelmapper.Converter; | |
import org.modelmapper.ModelMapper; | |
import org.modelmapper.PropertyMap; | |
import org.modelmapper.spi.MappingContext; | |
import org.testng.annotations.Test; | |
import java.util.Arrays; | |
import java.util.List; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.modelmapper.bugs; | |
import static org.testng.Assert.assertEquals; | |
import org.modelmapper.ModelMapper; | |
import org.modelmapper.PropertyMap; | |
import org.testng.annotations.BeforeMethod; | |
import org.testng.annotations.Test; | |
@Test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.modelmapper.functional.iterable; | |
import static org.testng.Assert.assertEquals; | |
import org.modelmapper.AbstractTest; | |
import org.modelmapper.Converter; | |
import org.modelmapper.PropertyMap; | |
import org.modelmapper.spi.MappingContext; | |
import org.testng.annotations.BeforeMethod; | |
import org.testng.annotations.Test; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.modelmapper; | |
import org.testng.annotations.BeforeMethod; | |
import org.testng.annotations.Test; | |
import java.util.Arrays; | |
import java.util.List; | |
import static org.testng.Assert.assertEquals; |
On Debian/Ubuntu
sudo apt-get install g++ gcc libxslt-dev
On CentOS/RedHat
sudo yum install libxslt-devel python-devel
SELECT | EPOLL | |
---|---|---|
Maximum monitoring fd | 1024 | No limitation |
Mechanism | Iterate each fd | Iterate each event |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public <T extends CustomParserConfig> T getConfig(Map<String,Object> configObject, Class<T> classType) { | |
ModelMapper modelMapper = new ModelMapper(); | |
modelMapper.createTypeMap(configObject, classType).addMappings(new PropertyMap<Map<String,Object>, T>() { | |
@Override | |
protected void configure() { | |
map(source("fields"), destination("fields")); | |
} | |
}).map(configObject); | |
} |