nu.studer.java.util
Class OrderedProperties.OrderedPropertiesBuilder

java.lang.Object
  extended by nu.studer.java.util.OrderedProperties.OrderedPropertiesBuilder
Enclosing class:
OrderedProperties

public static final class OrderedProperties.OrderedPropertiesBuilder
extends java.lang.Object

Builder for OrderedProperties instances.


Constructor Summary
OrderedProperties.OrderedPropertiesBuilder()
           
 
Method Summary
 OrderedProperties build()
          Builds a new OrderedProperties instance.
 OrderedProperties.OrderedPropertiesBuilder withOrdering(java.util.Comparator<? super java.lang.String> comparator)
          Use a custom ordering of the keys.
 OrderedProperties.OrderedPropertiesBuilder withSuppressDateInComment(boolean suppressDate)
          Suppress the comment that contains the current date when storing the properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrderedProperties.OrderedPropertiesBuilder

public OrderedProperties.OrderedPropertiesBuilder()
Method Detail

withOrdering

public OrderedProperties.OrderedPropertiesBuilder withOrdering(java.util.Comparator<? super java.lang.String> comparator)
Use a custom ordering of the keys.

Parameters:
comparator - the ordering to apply on the keys
Returns:
the builder

withSuppressDateInComment

public OrderedProperties.OrderedPropertiesBuilder withSuppressDateInComment(boolean suppressDate)
Suppress the comment that contains the current date when storing the properties.

Parameters:
suppressDate - whether to suppress the comment that contains the current date
Returns:
the builder

build

public OrderedProperties build()
Builds a new OrderedProperties instance.

Returns:
the new instance