Code example for InetAddress

Methods: getAddress

0
    @Test 
    public void verifyType1() throws UnknownHostException 
    { 
         
        UUID uuid = UUIDGen.makeType1UUIDFromHost(InetAddress.getByName("127.0.0.1"));
        assert uuid.version() == 1;
    } 
 
    @Test 
    public void verifyOrdering1() throws UnknownHostException 
    { 
        UUID one = UUIDGen.makeType1UUIDFromHost(InetAddress.getByName("127.0.0.1"));
        UUID two = UUIDGen.makeType1UUIDFromHost(InetAddress.getByName("127.0.0.2"));
        assert one.timestamp() < two.timestamp();
    } 
 
 
    @Test 
    public void testDecomposeAndRaw() throws UnknownHostException 
    { 
Contextual code suggestions in your IDE  Get Codota for Java