Class Breakpoints<V>
- Type Parameters:
- V- the type of values associated with each breakpoint
- All Implemented Interfaces:
- Iterable<Tuple<Breakpoint,- V>> 
Tuples class and adds methods to generate CSS modifier classes. The class is used as parameter in various components and
 layouts to apply CSS modifiers for responsive layout.
 The CSS modifier class for a single breakpoint is generated using the following rules:
- For normal breakpoints (modifiers()methods)- default breakpoint: pf-m-<value>
- all other breakpoints: pf-m-<value>-on-<breakpoint>
 
- default breakpoint: 
- For vertical breakpoints (verticalModifiers()methods)- default breakpoint: pf-m-<value>
- all other breakpoints: pf-m-<value>-on-<breakpoint>-height
 
- default breakpoint: 
 When generating the CSS modifier classes, String.valueOf(Object) is used by default to build the <value>
 part. If the value type implements TypedModifier, TypedModifier.value() is used instead.
 
Breakpoints can be created using either factory methods or a fluent API:
breakpoints(
        default_, 1,
        sm, 2,
        lg, 3);
breakpoints()
        .default_(1)
        .sm(2)
        .lg(3);
 To get the CSS modifiers classes, use the modifiers() and verticalModifiers() methods. Depending on the
 signature they return a list of CSS modifier classes, a single CSS modifier class or an empty string.
 
// pf-m-foo pf-m-bar-on-lg
breakpoints(default_, "foo", lg, "bar").modifiers();
// pf-m-start-foo__end-on-sm pf-m-start-bar__end-on-lg
breakpoints(sm, "foo", lg, "bar").modifiers(v -> "start-" + v + "__end");
// pf-m-a pf-m-b-on-sm-height pf-m-c-on-md-height pf-m-d-on-lg-height pf-m-e-on-xl-height pf-m-f-on-2xl-height
breakpoints(
        default_, "a",
        sm, "b",
        md, "c",
        lg, "d",
        xl, "e",
        _2xl, "f")
        .verticalModifiers();
breakpoints(md, "foo", lg, "bar").modifier(md); // pf-m-foo, because md in [md, lg]
breakpoints(md, "foo", lg, "bar").modifier(_2xl); // pf-m-foo, because [md, lg] < _2xl
breakpoints(md, "foo", lg, "bar").modifier(sm); // "", because [md, lg] > sm
- 
Method SummaryModifier and TypeMethodDescriptionAdds the given value for the 2xl breakpoint to the list of breakpoints.static <V> Breakpoints<V> Creates a new instance of Breakpoints with an empty list of breakpoints.static <V> Breakpoints<V> breakpoints(Iterable<Tuple<Breakpoint, V>> breakpoints) Creates a new instance of Breakpoints with the given breakpoints and values.static <V> Breakpoints<V> breakpoints(Breakpoint breakpoint, V value) Creates a new instance ofBreakpointswith a single tuple containing the given breakpoint and value.static <V> Breakpoints<V> breakpoints(Breakpoint breakpoint1, V value1, Breakpoint breakpoint2, V value2) Creates a new instance of Breakpoints with two tuples containing the given breakpoints and values.static <V> Breakpoints<V> breakpoints(Breakpoint breakpoint1, V value1, Breakpoint breakpoint2, V value2, Breakpoint breakpoint3, V value3) Creates a new instance of Breakpoints with three tuples containing the given breakpoints and values.static <V> Breakpoints<V> breakpoints(Breakpoint breakpoint1, V value1, Breakpoint breakpoint2, V value2, Breakpoint breakpoint3, V value3, Breakpoint breakpoint4, V value4) Creates a new instance of Breakpoints with four tuples containing the given breakpoints and values.static <V> Breakpoints<V> breakpoints(Breakpoint breakpoint1, V value1, Breakpoint breakpoint2, V value2, Breakpoint breakpoint3, V value3, Breakpoint breakpoint4, V value4, Breakpoint breakpoint5, V value5) Creates a new instance of Breakpoints with five tuples containing the given breakpoints and values.static <V> Breakpoints<V> breakpoints(Breakpoint breakpoint1, V value1, Breakpoint breakpoint2, V value2, Breakpoint breakpoint3, V value3, Breakpoint breakpoint4, V value4, Breakpoint breakpoint5, V value5, Breakpoint breakpoint6, V value6) Creates a new instance of Breakpoints with six tuples containing the given breakpoints and values.Adds the given value for the default breakpoint to the list of breakpoints.Adds the given value for the large breakpoint to the list of breakpoints.Adds the given value for the medium breakpoint to the list of breakpoints.modifier(Breakpoint breakpoint) Returns a single CSS modifier class for the given breakpoint, if this class contains the breakpoint.modifier(Breakpoint breakpoint, Function<V, String> stringValue) Returns a single CSS modifier class for the given breakpoint, if this class contains the breakpoint.Returns the CSS modifiers classes for the breakpoints of this class as a string separated by " ".Returns the CSS modifiers classes for the breakpoints of this class as a string separated by " ".Adds the given value for the small breakpoint to the list of breakpoints.Returns the vertical CSS modifiers classes for the breakpoints of this class as a string separated by " ".verticalModifiers(Function<V, String> stringValue) Returns the vertical CSS modifiers classes for the breakpoints of this class as a string separated by " ".Adds the given value for the x-large breakpoint to the list of breakpoints.Methods inherited from class org.patternfly.core.TupleshasKey, hasValue, isEmpty, iterator, key, size, stream, toString, tuples, tuples, tuples, tuples, tuples, tuples, tuples, tuples, tuples, tuples, tuples, valueMethods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliterator
- 
Method Details- 
breakpointsCreates a new instance of Breakpoints with an empty list of breakpoints.
- 
breakpointsCreates a new instance ofBreakpointswith a single tuple containing the given breakpoint and value.
- 
breakpointspublic static <V> Breakpoints<V> breakpoints(Breakpoint breakpoint1, V value1, Breakpoint breakpoint2, V value2) Creates a new instance of Breakpoints with two tuples containing the given breakpoints and values.
- 
breakpointspublic static <V> Breakpoints<V> breakpoints(Breakpoint breakpoint1, V value1, Breakpoint breakpoint2, V value2, Breakpoint breakpoint3, V value3) Creates a new instance of Breakpoints with three tuples containing the given breakpoints and values.
- 
breakpointspublic static <V> Breakpoints<V> breakpoints(Breakpoint breakpoint1, V value1, Breakpoint breakpoint2, V value2, Breakpoint breakpoint3, V value3, Breakpoint breakpoint4, V value4) Creates a new instance of Breakpoints with four tuples containing the given breakpoints and values.
- 
breakpointspublic static <V> Breakpoints<V> breakpoints(Breakpoint breakpoint1, V value1, Breakpoint breakpoint2, V value2, Breakpoint breakpoint3, V value3, Breakpoint breakpoint4, V value4, Breakpoint breakpoint5, V value5) Creates a new instance of Breakpoints with five tuples containing the given breakpoints and values.
- 
breakpointspublic static <V> Breakpoints<V> breakpoints(Breakpoint breakpoint1, V value1, Breakpoint breakpoint2, V value2, Breakpoint breakpoint3, V value3, Breakpoint breakpoint4, V value4, Breakpoint breakpoint5, V value5, Breakpoint breakpoint6, V value6) Creates a new instance of Breakpoints with six tuples containing the given breakpoints and values.
- 
breakpointsCreates a new instance of Breakpoints with the given breakpoints and values.
- 
default_Adds the given value for the default breakpoint to the list of breakpoints.
- 
smAdds the given value for the small breakpoint to the list of breakpoints.
- 
mdAdds the given value for the medium breakpoint to the list of breakpoints.
- 
lgAdds the given value for the large breakpoint to the list of breakpoints.
- 
xlAdds the given value for the x-large breakpoint to the list of breakpoints.
- 
_2xlAdds the given value for the 2xl breakpoint to the list of breakpoints.
- 
modifiersReturns the CSS modifiers classes for the breakpoints of this class as a string separated by " ".When generating the CSS modifier classes, String.valueOf(Object)is used by default to build the<value>part. If the value type implementsTypedModifier,TypedModifier.value()is used instead.
- 
modifiersReturns the CSS modifiers classes for the breakpoints of this class as a string separated by " ".When generating the CSS modifier classes, the specified function is used to build the <value>part.
- 
modifierReturns a single CSS modifier class for the given breakpoint, if this class contains the breakpoint. Otherwise, returns a single CSS modifier class for the given breakpoint, if this class contains a breakpoint smaller than the given one. Otherwise, this method returns an empty string.This method does not add the -on-<breakpoint>suffix!When generating the CSS modifier classes, String.valueOf(Object)is used by default to build the<value>part. If the value type implementsTypedModifier,TypedModifier.value()is used instead.
- 
modifierReturns a single CSS modifier class for the given breakpoint, if this class contains the breakpoint. Otherwise, returns a single CSS modifier class for the given breakpoint, if this class contains a breakpoint smaller than the given one. Otherwise, this method returns an empty string.This method does not add the -on-<breakpoint>suffix!When generating the CSS modifier classes, the specified function is used to build the <value>part.
- 
verticalModifiersReturns the vertical CSS modifiers classes for the breakpoints of this class as a string separated by " ".When generating the CSS modifier classes, String.valueOf(Object)is used by default to build the<value>part. If the value type implementsTypedModifier,TypedModifier.value()is used instead.
- 
verticalModifiersReturns the vertical CSS modifiers classes for the breakpoints of this class as a string separated by " ".When generating the CSS modifier classes, the specified function is used to build the <value>part.
 
-