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
//null情况 | |
Optional< String > fullName = Optional.ofNullable( null ); | |
System.out.println( "Full Name is set? " + fullName.isPresent() ); | |
System.out.println( "Full Name: " + fullName.orElseGet( () -> "[none]" ) ); | |
System.out.println( fullName.map( s -> "Hey " + s + "!" ).orElse( "Hey Stranger!" ) ); | |
//非空情况 | |
Optional< String > firstName = Optional.of( "Tom" ); | |
System.out.println( "First Name is set? " + firstName.isPresent() ); | |
System.out.println( "First Name: " + firstName.orElseGet( () -> "[none]" ) ); | |
System.out.println( firstName.map( s -> "Hey " + s + "!" ).orElse( "Hey Stranger!" ) ); |
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
alert("hhhhhhhhhhhhhhhhhh2222222222222222"); |
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
/* | |
http://www.126.com/ Auto Login => A javascript snippet to help you auto login www.126.com | |
Copyright (C) 2011 Kevintop | |
Includes jQuery | |
Copyright 2011, John Resig | |
Dual licensed under the MIT or GPL Version 2 licenses. | |
http://jquery.org/license | |
Includes 126.login.js |